Git
원격저장소에 push한 commit 되돌리기
_soyoung
2022. 2. 10. 14:21
반응형
git log
commit 기록을 확인한다.
git reset HEAD^
가장 마지막에 push한(가장 위에 있는) commit 을 삭제한다.
git push -f origin "브랜치명"
그리고 내가 commit 을 지웠다는 것을 github 서버에 알려주어
github 내에서도 해당 commit 을 삭제하도록 한다.
(원격저장소에 push되어있는 최상단 commit을 삭제한다.)
ex) git push -f origin master : master 브랜치에 있는 최상단 commit 삭제
참고 : https://eyeballs.tistory.com/446
반응형