이 질문은 몇 가지 커밋을 되 돌리는 동안 일부 커밋을 유지하고 싶다는 점에서 다른 질문과 다릅니다.`git fetch upstream;를 되돌리려면 어떻게해야합니까? git merge upstream/master`?
내 설정은 다음과 같습니다.
Upstream repo on github (public repo which I don't own)
Personal repo on my server(git clone --bare $upstream)
내 흐름이 같았다 :
Need to customize my personal branch
1. check out origin/master(Personal)
2. make changes
3. push to origin/master
Need to get new feature or bug fix from the original author(github)
1. git fetch upstream
2. git merge upstream/master
가 지금은/마스터가 버그가 상류 찾아 내가 가져 오기 전에
어떻게 상태로 돌아 가야합니까, 되돌릴/상류 합병 마지막으로?
편집.
- 한다고 가정
나는
- 내가 팀 구성원이 원산지/마스터 (개인)
가 지금은 1 단계를 실행 취소 할 푸시 무엇 합병 상류 합병했다.
git reset --hard co mmit_sha_of_one_prior_the_merge_1
(비록 샤를 찾는 것이 쉽지 않지만. 자식 로그는 많은 상류의 샤의 커밋을 보여줍니다, 그래서
가 어떻게이 2 단계 병합을 유지하지 upstream
의하지만 origin/master
이다 커밋 SHA-of_one_prior_the_merge_1)를 쉽게 찾을 수 아니에요?
에 개인
- 내가 상류
- 합병 약간 더 복잡한 시나리오를 가정 나는 다른 팀 구성원이 개인
이제 업스트림 병합을 실행 취소하고 싶습니다. 어떻게해야합니까?
http://stackoverflow.com/questions/2389361/undo-a-git-merge – 1615903