Last active
August 29, 2015 14:21
-
-
Save scottcreynolds/b28764242b41f25a5026 to your computer and use it in GitHub Desktop.
Git aliases
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
[user] | |
name = me | |
email = [email protected] | |
[alias] | |
s = status -s | |
cm = commit -m | |
br = branch | |
branches = branch -a | |
del = branch -d | |
co = checkout | |
cb = checkout -b | |
ac = !git add . && git commit -am | |
df = diff | |
who = shortlog -s -- | |
pr = pull --rebase origin master | |
cleanup = remote prune origin | |
# list branches sorted by last modified | |
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" | |
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master" | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
# most recent 8 commits formatted all nicelike | |
recent = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative -8 | |
lgpf = log --pretty=format:'%h - %an, %ar : %s' | |
wc = whatchanged -p --abbrev-commit --pretty=medium | |
#for gh-pages | |
publish = push origin gh-pages | |
# list aliases | |
la = "!git config -l | grep alias | cut -c 7-" | |
[mergetool "kdiff3"] | |
cmd = /Applications/kdiff3.app/Contents/MacOS/kdiff3 | |
trustExitCode = false | |
[merge] | |
tool = diffmerge | |
[mergetool "diffmerge"] | |
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\"" | |
trustExitCode = true | |
[diff] | |
tool = diffmerge | |
[difftool "diffmerge"] | |
cmd = diffmerge $LOCAL $REMOTE | |
[mergetool] | |
keepBackup = false | |
[core] | |
excludesfile = ~/.gitignore | |
[push] | |
default = current |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment