CLI Command
그만 찾아보고 외우자
git add 취소
$ git reset
$ git reset <file>
git commit 취소
$ git reset HEAD^ 최신 커밋 취소
$ git reset HEAD~n 최신 n개의 커밋 취소
git push 취소
$ git reset <commit id>$ git commit -m "commit messages"$ git push origin <branch name> -f
특정 commit으로 이동
clone한 후에 $ git reset --hard <commit id>로 이동 (명령어 한 줄로 할 수 없다는게 아쉽군..)
원격저장소
$ git remote -v 연결되어 있는 원격저장소 확인
$ git remote remove <name> 원격저장소 연결 끊기 (보통 <name>은 origin임)
$ git remote add <name> <url> 원격저장소 연결하기
브랜치
$ git branch 로컬 브랜치 리스트
$ git branch -r 원격 브랜치 리스트
$ git branch -a 로컬 + 원격 브랜치 리스트
$ git branch <name> 브랜치 생성
$ git checkout -b <name> 브랜치 변경