회사에서 PR을 열었다가, 오류를 발견하고 PR을 닫았다.
내 branch에 올라간 commit을 revert 하는 방법은 다음과 같다.
로컬
git reset --hard HEAD~1
로컬 commit이 이전 log로 돌아간다.
리모트
git push -f origin harry-l
리모트 브랜치인 harry-l의 커밋 상태가 취소 된다.
Reference
'Computer Science > Git' 카테고리의 다른 글
[Git] commit history 지우기 (0) | 2022.11.27 |
---|---|
[Git] Remote <-> Local 주요 작업 모음 (0) | 2022.11.13 |
[Git] git rebase 후 fixup으로 commit list 다듬기 (0) | 2022.11.13 |
[Git] Mutliple users (0) | 2022.05.22 |