Skip to content

Instantly share code, notes, and snippets.

@davebulaval
Last active March 31, 2019 15:02
Show Gist options
  • Save davebulaval/48a1ccc045411abf9aa2a06dbfdfc52d to your computer and use it in GitHub Desktop.
Save davebulaval/48a1ccc045411abf9aa2a06dbfdfc52d to your computer and use it in GitHub Desktop.
Git aliases
https://hackernoon.com/git-going-with-aliases-a9706e23fa9c
[alias]
publish = git push --set-upstream origin $(git rev-parse — abbrev-ref HEAD)
sync= !git fetch --all --prune && git rebase -p --autostash $1
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
uncommit = !git reset --soft HEAD^
unstage = !git reset
upstream = rev-parse --abbrev-ref --symbolic-full-name @{upstream}
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment