Member-only story
Git: Merge conflicts on Mac
Branches? Merges? It can be complex.
The use of Git is essential when creating software. As you use it you’ll realise how much of a flexible system it!
Prerequisites:
- Some knowledge of the terminal.
- Some previous use of VIM would be advantageous to create, edit and merge files.
Terminology
Git: Git is a distributed version-control system for tracking changes in source code during software development
The step-by-step tutorial, vimdiff
The following process assumes that you are using a Mac, and you are using the terminal. Terminal commands are prefixed with the dollar symbol ($) but is not typed into the command line itself.
Choosing which mergetool to use(this has to be done for each Git repository you initialise!)
$ git config merge.tool vimdiff
By default git displays the two files to be merged. It is usually a good idea to use diff3 to set the editor to display the common ancestor BASE while examining the changes in LOCAL and REMOTE through
$ git config merge.conflictstyle diff3