2011-02-12 14 views
5

어떤 대화 형이 아닌 자식 명령 (들) (BC는 병합입니다 커밋) 이후로 전에서의 변화를 달성는 별도의 지점 +는

전에 커밋 병합으로 커밋 :

A---B---C---D 

후 :

여기
B---C 
/ \ 
A-------BC---D' 

답변

5

내가 할 줄 작업은 다음과 같습니다

$ git branch to-merge-in C-commit-ID # Create a branch at C 
$ git reset --hard A-commit-ID   # Reset current branch to A 
$ git merge --no-ff to-merge-in   # Merge in branch. Create a merge commit. 
$ git cherry-pick D-commit-ID   # Grab the commit D 
,