git
[git] commit, push 취소하기
rachel_13
2022. 7. 31. 19:30
1. 커밋 number 확인하기
git log --oneline
2. reset으로 돌아갈 지점의 commit number 확인하고, git rest --hard 진행
git reset --hard "커밋넘버"
--hard : 해당 커밋 넘버 이후 작업한 내용이 staging에 남지 않음 (유의)
3. 다시 재 push 하기 (-force)
git push -f origin main