Last active
August 15, 2018 09:11
-
-
Save asafmaoz1234/ef1981e749719ef1be33814a12de6d7c to your computer and use it in GitHub Desktop.
useful git aliases to improve CLI experience (some more useful then others)
This file contains 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
# HOW to set: | |
# git config --global --replace-all alias.clist 'config --list' | |
alias.cm=commit -m | |
alias.cb=checkout -b | |
alias.st=status | |
alias.br=branch | |
alias.ms=merge --squash | |
alias.ch=checkout | |
alias.cam=commit -a -m | |
alias.clist=config --list | |
alias.ap=add -p | |
alias.ds=diff --staged | |
alias.slist=stash list | |
alias.ssave=stash save | |
alias.brl=branch --list | |
alias.cmamne=commit --amend --no-edit | |
alias.rebasebr=!f() { BR_NAME=$(git rev-parse --abbrev-ref HEAD); git checkout $1; git pull; git checkout $BR_NAME; git rebase $1; }; f | |
alias.pushfo=!f() { BR_NAME=$(git rev-parse --abbrev-ref HEAD); git push -f origin $BR_NAME; }; f | |
credential.helper=cache --timeout=3600 | |
push.default=simple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment