Created
September 22, 2017 09:28
-
-
Save jamesfe/42ed1efa832ce76e2af9221e882a02cc to your computer and use it in GitHub Desktop.
my git aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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