Skip to content

Instantly share code, notes, and snippets.

@eugenius1
Created May 17, 2016 14:15
Show Gist options
  • Save eugenius1/ea11bfb4b3338562353154bbec19fa6d to your computer and use it in GitHub Desktop.
Save eugenius1/ea11bfb4b3338562353154bbec19fa6d to your computer and use it in GitHub Desktop.
Git commands: add all, commit with a custom message, and a push
#! /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