Skip to content

Instantly share code, notes, and snippets.

@lukechampine
Created April 28, 2017 15:24
Show Gist options
  • Save lukechampine/edf99b7bb5a082cb1efcec82f793a40d to your computer and use it in GitHub Desktop.
Save lukechampine/edf99b7bb5a082cb1efcec82f793a40d to your computer and use it in GitHub Desktop.
[alias]
au = add -u .
c = commit -m
ca = commit --amend
can = commit --amend --no-edit
cf = commit --fixup
co = checkout
cob = checkout -b
com = checkout master
cp = cherry-pick
d = diff
ds = diff --staged
pf = push --force-with-lease
pom = pull origin master
rb = rebase -i
rbc = rebase --continue
rbm = rebase master
rh = reset HEAD
rhh = reset --hard HEAD^
s = status
sp = stash pop
peek = stash show -p
recent = "!r() { cur=$(git rev-parse --abbrev-ref HEAD); git for-each-ref --sort=-committerdate refs/heads/ --format='%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:reset)%(subject)|%(color:bold magenta)%(authorname)%(color:reset)' | sed \"s/m${cur}|/m* ${cur}|/\" | column -ts'|'; }; r"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment