Skip to content

Instantly share code, notes, and snippets.

@aprock
Created May 20, 2016 17:01
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 aprock/8b183ba5cbc5a8a273b8a3489b4034e7 to your computer and use it in GitHub Desktop.
Save aprock/8b183ba5cbc5a8a273b8a3489b4034e7 to your computer and use it in GitHub Desktop.
gitconfig
[alias]
st = status
stat = status
ci = commit
co = checkout
br = branch
ls = ls-files
undo = reset --soft HEAD^
merge = merge --no-commit
cdiff = diff --cached
ldiff = diff HEAD@{1}..HEAD@{0}
pstat = !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && git --no-pager log --name-status origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH
pdiff = !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && git log -p origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH
abandon = "!GIT_ABANDON() { git checkout -- $(git status | sed -ne \"/^#[[:space:]]\\+\\(deleted\\|modified\\):/{s/^#[[:space:]]\\+[^:]\\+:[[:space:]]\\+\\(.*\\)$/\\1/;p}\"); }; GIT_ABANDON"
lrev = log --reverse --no-merges --stat @{1}..
[core]
editor = atom --wait
[push]
default = simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment