# 이전에 작성한 커밋을 수정
# git add test.py
$ git commit --amend
# 과거의 커밋을 수정
$ git rebase -i <commit>
# git alias 설정
$ git config --global alias.st status
# 이미 이전에 커밋한 이력이 있는 파일을 add+commit
$ git commit -a
# commit하려는 파일의 변경 사항을 확인
$ git diff --staged
# 로그 한줄로 보기
$ git log --oneline
# 태그 만들기
$ git tag end-of-chapter-05
# 옮긴 파일을 git이 인식
$ git mv functional_test.py functional_tests/tests.py
# -M 옵션은 이동한 파일을 감지
$ git diff --staged -M
# git remote 확인
$ git remote -v
# git remote 변경
$ git remote set-url origin https://github.com/your_remote/repo.git
# 되돌리기 (푸시하기 전에 사용)
# HEAD는 마지막을 가리킴
$ git reset HEAD~2
$ git reset --hard HEAD~2