Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Three-ways are better (when merging)

568 views

Published on

A lot of developers avoid merging like the plague. Most common source control tools only support two-way merges out of the box. Many mistakes occur through bad merges (goto fail, maybe?). Correlation? Causation? We can fix that! Let's configure git to use a free, commercial-grade three-way merge tool and see how fun and fearless merging can be.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Three-ways are better (when merging)

  1. 1. Three-Ways Are Better (When Merging) Stephen Vance New England Software Engineers April 23, 2015
  2. 2. Merge-aphobia? Copyright 2015, Stephen Vance Three-ways Are Better 2
  3. 3. Diffing – Really? Copyright 2015, Stephen Vance Three-ways Are Better 3
  4. 4. We Can Do Better! Copyright 2015, Stephen Vance Three-ways Are Better 4
  5. 5. But How? 1. Download and Install P4Merge 2. Add it to your PATH export PATH=${PATH}:/Applications/p4merge.app/Contents/MacOS 3. Configure git to know about it git config --global merge.tool p4merge git difftool --tool-help 4. Use it! git difftool some.txt Copyright 2015, Stephen Vance Three-ways Are Better 5
  6. 6. Meanwhile, Back In The Console • You can turn that off – git difftool --no-prompt some.txt – git config mergetool.prompt off Copyright 2015, Stephen Vance Three-ways Are Better 6
  7. 7. I Thought You Said “Merging” git config --global merge.tool p4merge Copyright 2015, Stephen Vance Three-ways Are Better 7
  8. 8. Set Up Your Merge git checkout master git merge other git mergetool Copyright 2015, Stephen Vance Three-ways Are Better 8
  9. 9. Three-way Merges! Copyright 2015, Stephen Vance Three-ways Are Better 9
  10. 10. Demo Copyright 2015, Stephen Vance Three-ways Are Better 10
  11. 11. Thank You! www.vance.com steve@vance.com @StephenRVance LinkedIn: srvance Copyright 2015, Stephen Vance Three-ways Are Better 11

×