3

我为我的 1.0.2 修复创建了一个新分支。完成后,我想将它们合并回我的主人,所以我使用了:

git merge 'v1.0.2'

但是,它告诉我它是“已经是最新的”,这很奇怪。我说,好吧,那很好,所以我尝试删除分支:

git branch -d 'v1.0.2'

但现在它告诉我error: The branch 'v1.0.2' is not fully merged.

为什么我的更改一开始没有被合并?我是否需要以某种方式强制它们合并?

编辑:

的输出git log --all --oneline --graph --decorate

* a783018 (HEAD, origin/master, master) Updated with 1.0.2 changes
* c208285 Updates
| * 655b0ea (v1.0.2) Submitted 1.0.2 to apple for review
| * 0d4f33d Updates
|/  
| * 02f7155 (origin/v1.1, v1.1) Additional fixes
| * 5a68697 Renaming classes and .m .h files with three letter prefixes to comply with Apple requirements
| * c90a76d Added pin pad as an option
| * 3dc6ceb Adding new security methods to lock app if the user chooses
| * 3bf1c88 Updates
|/  
* 71af916 Bug fixes
* 523672f (tag: v1.0.2) Final fixes before release
* 0269dab Bug fixes and added new methods to specifically layout details screens
* e1e7c08 Bug fixes
* 071c9cc (tag: v1.0.1) Last changes before 1.0.1 submission
* 8d56576 Bug fixes
* 9e86414 Major file restructure for easier git viewing and structure
* 4f14c9e Updated a few methods to no longer use the Utility object
* 1be42ea Moved some properties to the ZSSingleton rather than the Squiz Matrix singleton
* 1450e7d Updated a few code snippets
* 27c3ebb Updated methods for Metadata
* baf8a6c (tag: v1.0) Final fixes, submitted to apple
* d5ffb6c Addtional fixes
* aa7d123 Removed unused files
* a472a1d Removal of old Matrix library. Removal of ASIHTTPRequest!
* b533ac3 Added new attribute types
* 76c29ef Adding UIDatePicker for creating of Calendar assets
* 1fb09dc Added some fixes for ipad
* 0f93c82 Cleaning up of code, adding comments
* 27c7984 Cleaning up of code, adding comments
* d0d29bb Added ignore file
* 7911483 A file was deleted
* fdba63c First add of all files
4

2 回答 2

2

您需要在另一个分支上才能合并它们。所以

git checkout master
git merge v1.0.2
git branch -d v1.0.2

看来你的合并失败了。它告诉您它已经是最新的并不好。尝试添加--allow-empty到合并中只是为了测试这一点。发出合并命令时,请确保您在 master 上。

于 2013-01-16T19:08:26.133 回答
1

尝试这个:

git checkout master
git merge refs/heads/v1.0.2

您显然同时拥有一个名为 的分支和一个标签v1.0.2,而且似乎git merge v1.0.2更愿意猜测您想要与标签合并,而不是与分支合并。上面的语法明确表明您想要合并分支。

于 2013-01-16T21:01:41.217 回答