Created
May 17, 2016 14:15
-
-
Save eugenius1/ea11bfb4b3338562353154bbec19fa6d to your computer and use it in GitHub Desktop.
Git commands: add all, commit with a custom message, and a push
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
#! /bin/sh | |
git status; | |
echo '\ntype your commit message to proceed with pushing new changes, or \033[31m"n" to abort\033[39m' | |
# \033 or \x1B or \e | |
read CommitMessage; | |
if [ "$CommitMessage" != "n" ] && [ "$CommitMessage" != "" ] && [ "$CommitMessage" != "N" ] | |
then | |
git add . && git commit -m "'$CommitMessage'" && git push | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment