Skip to content

Instantly share code, notes, and snippets.

@jefferyto
Last active November 17, 2018 17:38
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 jefferyto/1364306 to your computer and use it in GitHub Desktop.
Save jefferyto/1364306 to your computer and use it in GitHub Desktop.
What would I do without my aliases?
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p --date=local
changes = diff --name-status -r
diffstat = diff --stat -r
gitkconflict = !gitk --left-right HEAD...MERGE_HEAD
k = !gitk
spull = !git-svn fetch && git-svn rebase
spush = !git-svn dcommit
export = !sh -c '[ -d \"$2\" ] && git archive \"$1\" | tar -xC \"$2\" && exit 0 || echo \"usage: git export <tree-ish> <export path>\" >&2 && exit 1' -
exportchanged = !sh -c '[ -d \"$3\" ] && git diff --diff-filter=ACMRTUXB --name-only -z \"$1\" \"$2\" | xargs -0 git archive \"$2\" | tar -xC \"$3\" && exit 0 || echo \"usage: git exportchanged <from commit> <to commit> <export path>\" >&2 && exit 1' -
exportlastchanged = !sh -c '[ -d \"$1\" ] && git exportchanged HEAD~1 HEAD \"$1\" && exit 0 || echo \"usage: git exportlastchanged <export path>\" >&2 && exit 1' -
alias = !sh -c '[ \"$1\" != \"\" -a \"$2\" != \"\" ] && git config --global alias.\"$1\" \"$2\" && exit 0 || git config --list | grep "alias\\\\." | sed "s/alias\\\\.//" | sed "s/=/\\\\t=\\ /" | sort && exit 0' -
sclone = !git-svn init -s
sclonedir = !git-svn init
m = merge --no-ff
addtag = tag -a
lgf = log -p --date=local --follow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment