Git:表示master是最新的,但删除分支时表示它不是';

Git:表示master是最新的,但删除分支时表示它不是';,git,version-control,github,Git,Version Control,Github,我为我的1.0.2补丁创建了一个新分支。完成后,我想将它们合并回我的主文件,因此我使用: git merge 'v1.0.2' 但是,它告诉我它“已经是最新的”,这很奇怪。我说,好的,这很好,所以我尝试删除分支: git branch -d 'v1.0.2' 但是现在它告诉我错误:分支“v1.0.2”没有完全合并。 为什么我的更改没有首先被合并?我是否需要以某种方式强制它们合并 编辑: git log--all--oneline--graph--decoration的输出 * a783018

我为我的1.0.2补丁创建了一个新分支。完成后,我想将它们合并回我的主文件,因此我使用:

git merge 'v1.0.2'
但是,它告诉我它“已经是最新的”,这很奇怪。我说,好的,这很好,所以我尝试删除分支:

git branch -d 'v1.0.2'
但是现在它告诉我
错误:分支“v1.0.2”没有完全合并。

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

编辑:

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

* 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

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

git checkout master
git merge v1.0.2
git branch -d v1.0.2
看来你的合并失败了。它告诉你它已经是最新的,这是不好的。尝试向合并中添加
--允许空的
,以测试这一点。发出合并命令时,请确保您处于主控状态。

请尝试以下操作:

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

显然,您有一个分支和一个名为
v1.0.2
的标记,而且
git merge v1.0.2
似乎更喜欢猜测您想要与标记合并,而不是分支。上面的语法明确表示您希望合并分支。

可以提交它,看看发生了什么。尝试提交后,一切正常。没有警告。仍然困惑,为什么删除分支告诉我它没有完全合并。为什么使用引号?我不知道。这有关系吗?我想我是把它当作一根弦…我在大师级上。仍然说事情是最新的。然后删除时会显示
错误:分支“v1.0.2”未完全合并。
要查看发生了什么(请在此处发布此输出),请执行
git log--all--oneline--graph--decoration
。我想这就是问题所在。现在它说
错误:“合并”是不可能的,因为您有未合并的文件。
听起来您已经在进行合并了。如果是这样,并且您不想保留迄今为止所做的任何事情,
git merge--abort
应该会清理失败的合并。发布您的
git状态
可能有助于识别其他问题……啊,好吧,看起来它挂在一个二进制文件上。我执行了git merge--abort,然后再次尝试合并,它告诉我:无法合并二进制文件:squizMatrix.xcodeproj/project.xcworkspace/xUserData/webmaster.xUserDatad/UserInterfaceState.xUserState(HEAD vs.refs/heads/v1.0.2)
。有没有解决这个问题的好办法?抱歉,合并新手…最好的方法可能是执行
git签出--我们的--
,然后
git add
git commit
告诉它文件的(
master
)版本(使用
--他们的--
v1.0.2
获取副本)。然后认真考虑你是否真的需要跟踪那个文件……这听起来是个好主意,但似乎不起作用。代码>您的分支比“原始/主”早1次提交。没有要提交的内容
。Arg。不知道该怎么办。我不想跟踪这个文件。。。