Last active
February 17, 2020 11:47
-
-
Save leunardo/0aad90110fd0ac12cf983272b9475620 to your computer and use it in GitHub Desktop.
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
| [alias] | |
| # stash; checkout; pop | |
| # git scp -> | |
| # git stash; git checkout -; git stash pop; | |
| scp = !git stash && git checkout - && git stash pop | |
| # stash; checkout specific; pop | |
| # git scsp myBrach -> | |
| # git stash; git checkout myBranch; git stash pop; | |
| scsp = !git stash && git checkout $1 && git stash pop && : | |
| # branch search | |
| bs = !git branch --all | grep $1 --ignore-case && : | |
| # undo last commit | |
| undo = !git reset HEAD~1 | |
| # discard all changes done | |
| discard = !git checkout -- . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment