2011-12-20 49 views
1

Git版本1.7.7.4分行仍然有合并

后的差异,我有两个分支developmenttesting

本来testing创建自development

我一直只对testing工作。所以现在我的testing分支与development相比有很多不同。

因为testing现在有我的最新更改,我想让development与测试相同。

所以我做了以下合并它们。

git checkout development 
git merge -s recursive -Xtheirs testing 

但是,当我得到两个分支之间的差异。仍然有很多不同之处。

所以我决定重设development分支,通过执行以下再试一次:

git merge testing 

但是,我仍然得到同样的差异。

如果我尝试并重新合并而不重置。我得到already up-to-date

有没有什么办法可以使development分支与testing分支相同?

非常感谢任何建议,

回答

1

合并developmenttesting后,development将获得全部来自testingtesting的变化将有没有变化上development。图表看起来像:

* bc6339d - (HEAD, development) Merge branch 'testing' 
|\ 
| * 588c9a3 - (testing) commit message 
* | 2d484f2 - another commit 

请参阅testingdevelopment在不同的版本。

要合并他们,他们有你可以做同样的变化:

git checkout development 
git merge -Xtheirs testing 
git checkout testing 
git merge development 

图表现在应该是这样的:

* bc6339d - (HEAD, testing, development) merge branch 'testing' 
|\ 
| * 588c9a3 - commit message 
* | 2d484f2 - another commit 

如果你想要让他们分开,做git merge --no-ff development