Created
July 15, 2018 12:18
-
-
Save amazingsmash/560b9b77c7109b35a4569ffaa23da5cb to your computer and use it in GitHub Desktop.
Little Git cheat that saves me A LOT of time. Use with caution. Usage: 'git cmp "Commit message"'
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 config --global alias.cmp '!f() { git status && | |
read -p "Are you sure? " -n 1 -r && | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
git add -A && git commit -m "$@" && git push | |
fi; }; f' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment