Last active
July 25, 2017 13:37
-
-
Save kittsville/99eade7e958c165e1b9142492cb78da0 to your computer and use it in GitHub Desktop.
Helpful Git Aliases
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
/** | |
* git wipe | |
* Removes all uncommitted changes and untracked files/folders | |
*/ | |
git config --global alias.wipe '!git reset --hard && git clean -fd' | |
/** | |
* git undo | |
* Removes the last commit but leaves all its changes. | |
* Really useful if you fuck-up the commit message | |
*/ | |
git config --global alias.undo 'reset --soft HEAD~' | |
/** | |
* git production | |
* Merges master into gh-pages then pushes all branches | |
* Easy way to push production changes onto GitHub pages | |
* (Or just set GitHub to publish your site from master) | |
*/ | |
git config --global alias.production '!git checkout gh-pages && git merge master && git push --all && git checkout master' | |
/** | |
* git | |
* Creates remote branch of same name and pushes | |
*/ | |
git config --global alias.neil "push --set-upstream origin \"$(git rev-parse --abbrev-ref HEAD)\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment