본문 바로가기

git&github18

사라진 stash 찾기 starkying.tistory.com/entry/restoring-git-stash실수로 clear한 Git Stash 복구하기퇴근을 얼마 남겨두지 않은 어느 오후, 예전에 작업하던 변경분을 다시 가져오려고 IntelliJ에서 "Unstash Changes"를 열었다. 일단 그 전에! 이미 merge되어 필요 없어진 오래된 stash들을 drop한다는 걸... starkying.tistory.com git fsck --no-reflog | awk '/dangling commit/ {print $3}' | xargs -L 1 git --no-pager show -s --format="%ci %H" | sort git stash apply [스태시명☆] 2020. 11. 16.
[error] 커밋 안됨 .git/hooks/pre-commit: line 2: ./node_modules/pre-commit/hook: No such file or directory .git/hooks디렉토리로 이동하여 pre-commit파일을 제거 하십시오. stackoverflow.com/questions/43933490/pre-commit-hook-no-such-file-or-directory pre-commit/hook: No such file or directory I get this error when I try to commit. OS - Latest OSX Git version - git version 2.11.0 (Apple Git-81) .git/hooks/pre-commit: line 2: ./node_modules/pre-commit/hook: No such file or directory stackoverflow.com 2020. 11. 12.
오래된 branch에서 master pull 받기 git branch git checkout master git pull upstream master 마스터 브랜치에서 최신 파일을 업데이트 한 뒤 업데이트하고 싶은 브랜치에서 rebase master를 한 뒤 마스터 브랜치에서 merge 브랜치명 -ff git checkout my-branch git rebase master git checkout master git merge my-branch --ff 그러나 해결되지 않았습니다 나는 이문제를 다시 다룰 것이다 rebase 2020. 11. 12.
특정 파일만 pull 받기 git checkout 브랜치명 -- 파일명 브랜치명 뒤에 -- 붙이고 파일명 쓰면 된다. 2020. 11. 12.
병합 충돌로 인해 git pull 안됨 error: 병합 작업을 다 마치지 않았습니다 (MERGE_HEAD 파일이 있습니다) 힌트: 병합하기 전에 변경 사항을 커밋하십시오. fatal: 병합을 마치지 못했기 때문에 끝납니다. git push를 하려고 하니 git pull을 하라고 하고, git pull을 하려고 하니 병합을 하라고 한다. 그런데 병합해야 할 파일을 잘못 건드렸더니 변경 사항에 뜨지 않는다. git reset --merge merge 전으로 돌아간 후 다시 git pull을 한다. 2020. 11. 4.
[reset] 이전 commit 취소하고 다시 커밋하기 git reset을 통해 돌아갈 지점을 선택한다. git reset [commit num] 다시 commit 한다. [git reset --soft] 와 [git reset] 의 차이는 스테이징 되느냐 안되느냐 이다. --soft를 붙이면 커밋 이전 상태로 돌아간 후에도 수정된 파일들이 스테이징되어 있다. 그리고 --hard는 해당 커밋 이후 수정된 파일들은 날려버린다. 업데이트 후 에러 날 때 되돌리기 좋다. www.devpools.kr/2017/02/05/%EC%B4%88%EB%B3%B4%EC%9A%A9-git-%EB%90%98%EB%8F%8C%EB%A6%AC%EA%B8%B0-reset-revert/ [초보용] Git 되돌리기( Reset, Revert ) 개발바보들 1화 git “back to th.. 2020. 11. 4.
[error] We've failed to pass the specified git pre-commit hooks as the `lint` ✖ 2 problems (2 errors, 0 warnings) pre-commit: pre-commit: We've failed to pass the specified git pre-commit hooks as the `lint` pre-commit: hook returned an exit code (1). If you're feeling adventurous you can pre-commit: skip the git pre-commit hooks by adding the following flags to your commit: pre-commit: pre-commit: git commit -n (or --no-verify) pre-commit: pre-commit: This is ill-advised.. 2020. 10. 13.
github에서 커밋 변경사항 확인하기 commits 클릭 확인할 커밋명 클릭 2020. 10. 1.
강제로 push하기 git push origin "+브랜치명" git push origin "브랜치명" — force 브랜치명 앞에 +를 붙이거나 --force를 붙인다. www.hahwul.com/2016/02/02/coding-git-push-push-error-failed-to/ [CODING] GIT에서 강제로 Push 하기 / push 에러 해결하기 ( error: failed to push some refs to ) Security engineer, Bugbounty hunter, Developer and... H4cker www.hahwul.com 2020. 10. 1.