2014-10-29 2 views
1

masterdevelop 가지가 있다고 가정 해보십시오. 더 나아가, 당신은 워크 플로우 말은 같다 : develop보존 방법 - rebase 후에 --no-ff 병합

  • 가 새 feature 분기를 체크 아웃;
  • 작동;
  • 체크 아웃 develop 다시;
  • feature 분기를 --no-ff과 병합하십시오.

이렇게하면 커밋이 어떤 기능에 속하는지 잘 볼 수 있습니다. 어떤 점에서

* Merge branch 'feature' into develop 
|\ 
| * Commit 3 
| * Commit 2 
| * Commit 1 
|/ 
* Some old commit 

당신은 master 잡아 당기 develop을 리베이스하고 싶다. 그러나, REBASE 후 일반 병합을 feature 분기를 게재하고 생략하지 않고 선형 방식으로 git log 표시 develop의 모든 커밋은 커밋 :

* Commit 3 
* Commit 2 
* Commit 1 
* Some old commit 

왜 그렇게이며 어떻게이 REBASE 후이를 보존 할 수 있습니까?

+0

중복 가능성 (http://stackoverflow.com/questions/9013411/rebase-a-merge-commit) – sschuberth

답변

3

패스 -pgit rebasehttp://git-scm.com/docs/git-rebase.html 참조 :

-p 
--preserve-merges 

    Instead of ignoring merges, try to recreate them. 

    This uses the --interactive machinery internally, but combining it with the --interactive option explicitly is generally not a good idea unless you know what you are doing (see BUGS below). 
[병합을 리베이스 커밋]의
관련 문제