我有两个分支,我喜欢合并“A”和“B”。所以我做了以下
git checkout A
git checkout -b AB
git merge B
我在使用TortoiseMerge解决的文件TestSequenceSchemaTest.cs中没有冲突。在“Resolve Finished”之后我做了一个git状态
schoetbi@P02016097 /s/sara_git ((24a2cd5...)|REBASE)
$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: SARA.sln
# modified: src/Module.TestProgramAdmin/SARA.Modules.TPA.IpoFile.Test/Sara.Modules.TPA.IpoFile.Test.csproj
# modified: src/Module.TestProgramAdmin/Sara.Modules.TPA.IpoFile.Test/Sara.Modules.TPA.IpoFile.Test.csproj
# modified: src/Module.TestProgramAdmin/Sara.Modules.TPA.IpoFile.Test/TestSequenceSchemaTest.cs
# renamed: src/Platform.RT/Sara.Platform.RT.Components/MediatorComponent/SequenceGeneratorXml.cs.orig -> src/Pl
atform.RT/Sara.Platform.RT.Components/MediatorComponent/SequenceGeneratorXml.cs
#
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: src/Module.TestProgramAdmin/SARA.Modules.TPA.IpoFile.Test/TestSequenceSchemaTest.cs
#
现在我尝试了git add
git add src/Module.TestProgramAdmin/SARA.Modules.TPA.IpoFile.Test/TestSequenceSchemaTest.cs
但是现在该文件仍处于“两个已修改:”部分。我现在能做什么?
答案 0 :(得分:1)
认为不完全是必需的,但是,你确定你将git checkout
做到了分支吗?正如git状态所示,您是Not currently on any branch
。你可能处于一些你没有中止的rebase中间(如git bash提示 - (24a2cd5...)|REBASE
所示)。将您的工作目录设置为正确的状态,然后尝试合并。虽然合并和添加也应该处于分离状态,但我没有看到任何其他可能的问题。