I have a foo.cpp file. There is a modification on master branch,
merge conflict test, make a master modification. There is another modification on the branch br1 in the same line,
merge conflict test, make a local modification and will stash it. Now, I'm on br1 and stash the local modification, then I rebase the master branch.
git rebase origin/master Then I git stash pop the local modification, here I get the conflict,
<<<<<<< Updated upstream merge conflict test, make a master modification. ======= merge conflict test, make a local modification and will stash it. >>>>>>> Stashed changes Here's the problem. When I working on Visual Studio, I know I can click "merge" button within the VS GUI to edit the conflict. After that, I can git --continue to go through this conflict.
But in current situation, I don't have VS. I don't how the command to edit the conflict. I can edit it in notepad, because the conflict is simple, but I don't know how to mark it as resolved.
git add <path_to_file>to add it to the index. That marks the conflict as resolved and you can usegit merge --continueto continue the merge.git add <path_to_file>can work, butgit merge --continueturned out error: unknown option `continue'git merge --continue, your Git is fairly old (rungit --versionto get its version number). Allgit merge --continuedoes, though, is verify that there is a merge to finish, then rungit commit—so you can just rungit commitsince you don't have the--continueoption.