git

· git
#git git pull 시 stash 또는 merge를 먼저 하라는 안내가 나올 때가 있다. 중요하지 않은 파일을 덮어쓰기 해도 무방할 경우 덮어쓰기 하는 것이 빠르다. git pull 받을 목록을 repository에서 업데이트 git fetch --all git reset으로 head를 최신으로 가리킨다 git reset --hard origin/main git pull로 확인 git pull
· git
커밋 로그 확인 git reflog 혹은 git log -g 커밋 시점으로 되돌리기 git reset --hard [commit_id]
· git
문제 error pathspec 'first Commit' did not match any file(s) known to git 이유는 commit 뒤에 스페이스 기준으로 parameter가 3개, 즉 -m, ‘initial, commit’ 이렇게 3개가 잡혀서 그런것이었다. Windows에서 문자열을 입력할 때는 쌍따옴표로 감싸야 한다. 해결 git commit -m "Initial commit"
jjsilver
'git' 카테고리의 글 목록 (3 Page)