Skip to content

Instantly share code, notes, and snippets.

@jamesfe
Created September 22, 2017 09:28
Show Gist options
  • Select an option

  • Save jamesfe/42ed1efa832ce76e2af9221e882a02cc to your computer and use it in GitHub Desktop.

Select an option

Save jamesfe/42ed1efa832ce76e2af9221e882a02cc to your computer and use it in GitHub Desktop.
my git aliases
# publish a review
alias opush="git push origin HEAD:refs/publish/master"
# publish a draft
alias dpush="git push origin HEAD:refs/drafts/master"
alias gs="git status"
# next 4 aliases all automatically merge fixups into their targets
# commit fixups like so "git commit --fixup HEAD" (where <head> can be HEAD~1 HEAD~2, commit hash, etc.)
alias rebase2="git rebase -i HEAD~2 --autosquash"
alias rebase3="git rebase -i HEAD~3 --autosquash"
alias rebase4="git rebase -i HEAD~4 --autosquash"
alias rebase5="git rebase -i HEAD~5 --autosquash"
# pull from master and stack my commits on top of the latest
alias prebase="git pull --rebase origin develop"
alias gl="git log --oneline -n 10"
alias gt="git branch"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment