Created
October 11, 2012 19:27
-
-
Save laszlomiklosik/3874904 to your computer and use it in GitHub Desktop.
Configure meld as git diff and merge tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired from http://nathanhoad.net/how-to-meld-for-git-diffs-in-ubuntu-hardy | |
# and http://gitguru.com/2009/02/22/integrating-git-with-a-visual-merge-tool/ | |
sudo apt-get install meld | |
# create a python script with the below content and name it diff.py | |
#!/usr/bin/python | |
import sys | |
import os | |
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5])) | |
git config --global diff.external /path/to/diff.py | |
git diff filename | |
# the latter command should pop you up the meld diff tool | |
# for using meld as a merge tool run | |
git mergetool | |
# after git merge has already ran and generated conflicts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment