I have two branches that I like to merge “A” and “B”. So I did the following
git checkout A
git checkout -b AB
git merge B
No I have a conflict in file TestSequenceSchemaTest.cs that I also resolved using TortoiseMerge. After “Resolve Finished” I made a git status
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
#
Now I tried git add
git add src/Module.TestProgramAdmin/SARA.Modules.TPA.IpoFile.Test/TestSequenceSchemaTest.cs
But now the file stays still in the “both modified:” section. What can I do now?
Thought not exactly required, but, are you sure you did the
git checkoutto a branch? As the git status says, you areNot currently on any branch. You were probably in middle of some rebase which you did not abort ( as indicated by the git bash prompt –(24a2cd5...)|REBASE). Get your working directory to a proper state and then try the merge. While the merge and add should work in a detatched head state too, I don’t see any other possible problems.