로컬 분기와 마스터 분기 모두 마지막 커밋으로 롤백 할 수 있습니까?로컬 분기와 마스터 분기 모두에서 롤백 하시겠습니까?
$ git reset --hard HEAD^
HEAD is now at e861a3e Added push menu label.
$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
내가 당겨달라고합니다. 그러나 내가 끌어 당기면 마스터 지점에서 같은 커밋을 되 찾을 수 있습니다.
나는 내 코드에서 실수를 저 지르려고 내가 범하고 밀었다. 그래서 커밋과 푸시를 롤백해야합니다.
이 작업을 어떻게 올바르게 수행 할 수 있습니까?
로컬 브랜치에서 리셋을 한 후에 강제로 로컬 푸시 할 수 있습니다 :'git push --force origin master'. – jojo
당신은 대답을 읽을 수 있습니다. http://stackoverflow.com/questions/4114095/how-to-revert-git-repository-to-a-previous-commit –