Skip to content

Instantly share code, notes, and snippets.

@steel1990
Last active March 29, 2016 03:46
Show Gist options
  • Save steel1990/ece761ff1b33634f29e8 to your computer and use it in GitHub Desktop.
Save steel1990/ece761ff1b33634f29e8 to your computer and use it in GitHub Desktop.
[alias]
pom = push origin master
pu = pull --rebase origin master
st = status
co = checkout
br = branch
mg = merge
ci = commit
md = commit --amend
dt = difftool
mt = mergetool
last = log -1 HEAD
cf = config
line = log --oneline
latest = for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short) [%(committername)]'
ls = log --pretty=format:\"%C(yellow)%h %C(blue)%ad %C(red)%d %C(reset)%s %C(green)[%cn]\" --decorate --date=short
hist = log --pretty=format:\"%C(yellow)%h %C(red)%d %C(reset)%s %C(green)[%an] %C(blue)%ad\" --topo-order --graph --date=short
type = cat-file -t
dump = cat-file -p
ref = "!f() { git remote -v | grep fetch | grep \"$1\" | sed -e 's/:/\\//' -e 's/^.*git@/http:\\/\\//' -e 's/\\.git.*$//'; }; f $@"
ref-open = "!f() { git ref \"$1\" | xargs open; }; f $@"
[diff]
tool = bc3
[difftool]
bc3 = trustExitCode
prompt = false
[merge]
tool = bc3
[core]
excludesfile = /Users/yuankong/.gitignore_global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment