Created
July 15, 2018 12:18
-
-
Save amazingsmash/e9925cc4497bea8af7326b2a4d4a7f8e 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 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
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