Skip to content

Instantly share code, notes, and snippets.

@emdienn
Last active July 21, 2020 03:00
Show Gist options
  • Save emdienn/9b90eab63f62e0c5277da35d8eaabcb5 to your computer and use it in GitHub Desktop.
Save emdienn/9b90eab63f62e0c5277da35d8eaabcb5 to your computer and use it in GitHub Desktop.
git aliases
[alias]
co = checkout
cb = checkout -b
s = status
br = branch
com = commit
cm = commit -m
cam = commit --amend
stache = stash save -u
unstache = stash pop
cp = cherry-pick
a = add
ap = add -p
rh = reset HEAD
d = diff --cached
dw = diff -w
po = push origin
pfo = push -f origin
shove = push -f
fu = fetch upstream
fo = fetch origin
r = rebase -i
lo = log --oneline
unwind = reset --soft HEAD^
sync = "!f() { git checkout $1 && git pull --ff-only upstream $1 && git push origin; }; f"
last = log --oneline -n1
ff = pull --ff-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment