Created
September 25, 2016 15:16
-
-
Save PragmaticEd/c60b8eb2fbd237fb09f6550dbe65b3da to your computer and use it in GitHub Desktop.
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
| # Make nano default editor: | |
| git config --global core.editor 'nano' | |
| # git log2 | better log (one liners): | |
| git config --global alias.log2 "log --pretty=format:'%C(yellow) %h %C(cyan) %cd %C(white) %s %C(red) (%an)'" | |
| # git network | network (github network in terminal): | |
| git config --global alias.network "log -20 --pretty=format:'%C(yellow)%h%Creset\\ %C(green)%ar%C(cyan)%d\\ %Creset%s%C(yellow)\\ [%cn]' --graph --decorate --all" | |
| # git undo-commit | undo commit (leaving changes): | |
| git config --global alias.undo-commit "reset --soft HEAD^" | |
| # git remove-commit | remove commit (deleting content): | |
| git config --global alias.remove-commit "reset --hard HEAD^" | |
| # git unmerged | show unmerged branches: | |
| git config --global alias.unmerged "branch --no-merged master" | |
| # git merged | show merged branches: | |
| git config --global alias.merged "branch -r --no-merged" | |
| # git fetch_all | fetch and track all remote branches | |
| git config --global alias.fetch_all "for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment