Skip to content

Instantly share code, notes, and snippets.

@th-lange
Forked from tacsio/Git Configs
Last active October 14, 2015 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save th-lange/c5c28811d49045471ca4 to your computer and use it in GitHub Desktop.
Save th-lange/c5c28811d49045471ca4 to your computer and use it in GitHub Desktop.
My git config
[user]
name = foo
email = foo@bar.de
[push]
default = simple
[core]
editor = /opt/sublime_text/sublime_text %n
[color]
ui = true
[alias]
s = status
c = checkout
b = branch
a = add
lol = log --oneline --graph --decorate
[merge]
tool = meld
conflictstyle = diff3
[diff]
tool = meld
[mergetool "meld"]
trustExitCode = false
cmd = meld $LOCAL $BASE $REMOTE --auto-merge --output $MERGED
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"
[mergetool]
keepBackup = false
[core]
editor = vim
git config --global user.name "Thomas Lange"
git config --global user.email "mymail@myprovider.com"
git config --global color.ui true
git config --global core.editor "vim"
git config --global alias.a add
git config --global alias.s status
git config --global alias.c checkout
git config --global alias.b branch
git config --global alias.lol 'log --oneline --graph --decorate'
git config --global merge.tool meld
git config --global mergetool.meld.cmd 'meld $LOCAL $BASE $REMOTE --auto-merge --output $MERGED'
git config --global mergetool.keepBackup false
git config --global mergetool.meld.trustExitCode false
git config --global diff.tool meld
git config --global difftool.meld.cmd 'meld $LOCAL $REMOTE'
#!/usr/bin/python
# use this for a simple symlink to /usr/local/bin/meld
import sys
import os
import subprocess
if len(sys.argv) > 1:
left = os.path.abspath(sys.argv[1]);
else:
left = ""
if len(sys.argv) > 2:
right = os.path.abspath(sys.argv[2]);
else:
right = ""
mid = ""
if len(sys.argv) > 3:
mid = right;
right = os.path.abspath(sys.argv[3]);
else:
right = ""
mid = ""
MELDPATH = "/Applications/Meld.app"
arguments = " -n " + MELDPATH + " --args " + left + " " + mid + " " + right
p = subprocess.call(['open', '-W', '-a', MELDPATH, '--args', left, mid, right])
[core]
excludesfile = /Users/*****/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[user]
name = *****
email = ****
[push]
default = simple
[diff]
tool =
@th-lange
Copy link
Author

@th-lange
Copy link
Author

Note Bene:
My git config --global does not like ' " sequences. SO it is better to directly edit the .gitconfig in $HOME
with the values:
[alias]
s = status
c = checkout
b = branch
a = add
lol = log --oneline --graph --decorate
[merge]
tool = meld
[diff]
tool = meld
[mergetool "meld"]
trustExitCode = false
cmd = meld "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"

@th-lange
Copy link
Author

meld on oSX
Use this script to run: meld.sh
Link it to /usr/local/bin/meld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment