Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Thanks I didn't realise that pull also merges. I have done a fetch and a merge, but nothing seems to happen - although git now says everything is up to date. I expected the merge to show a 'merge conflict' where you have to manually edit the changes you want to keep?
    – Kokodoko
    Commented Mar 18, 2016 at 14:00
  • In this case, it looks like Git was able to peform the diff resolution for you...to be confident you have taken in what you intended a good "sanity check" tool that I use often is "gitk". It comes with the Git install so you should already have it. Just type "gitk" on your command terminal for a GUI-type view of your Git tree. Commented Mar 18, 2016 at 14:02
  • 1
    The merge inserted comments in my file, that look like this: <<<<<<<HEAD key:7234095827345093458. Perhaps git couldn't find my fileMerge tool and inserted these codes for me to resolve in a text editor?
    – Kokodoko
    Commented Mar 18, 2016 at 14:07
  • Yes, that sounds like a plausible reason for that to happen...if you wanted to re-do the merge (after fixing your merge-tool) you should be able to do: git reset --hard MERGE_HEAD to get back to your pre-merge state Commented Mar 18, 2016 at 14:11
  • Thanks, that already answers my question why I couldn't merge (I had to have the two different versions available first). What remains now is how to get git to automatically open "opendiff/fileMerge" in case of a conflict. I suppose that's a different question.
    – Kokodoko
    Commented Mar 18, 2016 at 14:27