CS/Git
[GIT] 특정 commit 삭제하기
Harimad
2022. 3. 8. 15:25
문제인식

해결방안
git rebase -i HEAD~2
git rebabse
- Reapply commits on top of another base tip
-i, --interactive
Make a list of the commits which are about to be rebased.
Let the user edit that list before rebasing.
HEAD~2
- HEAD에서 2번째 떨어진 commit 까지 가져오겠다

실행화면

실행결과
해당 커밋이 삭제가 된다