Skip to content

Instantly share code, notes, and snippets.

@tilboerner
Last active January 17, 2017 03:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tilboerner/5878413 to your computer and use it in GitHub Desktop.
Save tilboerner/5878413 to your computer and use it in GitHub Desktop.
useful git aliases and config
[user]
name="NAME HERE"
email="E-MAIL HERE"
[alias]
co = checkout
dt = difftool
cm = commit
cma = "commit -a"
s = status
ps = push
p = pull
a = add
aa = "add --all"
ai = "add --interactive"
b = branch
f = fetch
rb = rebase
# log output:
#
# cf http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit
lg = !"git lg1"
[diff]
tool="diffuse"
[difftool]
prompt=false
[merge]
tool="external"
[mergetool]
prompt=false
[mergetool "external"]
cmd = "mergetool.sh $LOCAL $MERGED $REMOTE"
[push]
default = simple
[color]
ui = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment