CLI/깃허브
git add취소, git commit 취소
씩씩한 IT블로그
2024. 4. 24. 12:15
반응형
git add 취소
// 전체 파일 add 취소
git reset
// 특정파일 add 취소
git reset HEAD {파일명}
git commit 취소
// 가장 최신 커밋 1개 취소
git reset HEAD^
// 가장 최신 커밋 2개 취소
git reset HEAD^^
* fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree. 오류발생시?
=> git update-ref -d HEAD
반응형