Last active
April 6, 2017 14:28
-
-
Save akullpp/029df3941da7768863f8e2b589166f6c to your computer and use it in GitHub Desktop.
Git Helper Commands
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
// diff-so-fancy | |
npm install -g diff-so-fancy && git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" | |
// git status abbreviation | |
git config --global alias.st 'status' | |
// git add, amend and force push | |
git config --global alias.ap '!git add . && git commit --amend --no-edit && git push -f' | |
// git delete branches merged to develop | |
git config --global alias.br '!git branch --merged develop | grep -v "\* develop" | xargs -n 1 git branch -d' | |
// Prune | |
git config --global alias.prune 'fetch --prune' | |
// Undo | |
git config --global alias.undo 'reset --soft HEAD^' | |
// Stash | |
git config --global alias.stash 'stash -u -k' | |
// Settings | |
git config --global pull.rebase true | |
git config --global merge.ff only | |
git config --global commit.gpgSign true | |
git config --global push.followTags true | |
git config --global push.default simple | |
git config --global status.showUntrackedFiles all | |
git config --global stash.showPatch true | |
git config --global rebase.autostash true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment