Last active
July 26, 2016 18:10
-
-
Save darshilv/4d272f025f0610428939663418cb8745 to your computer and use it in GitHub Desktop.
Got tired of entering the same set of commands in sequence, creating a simple bash script to avoid doing it redundantly
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/zsh | |
if [ $# == 0 ]; then | |
echo 'Usage: sh standard_git_heroku [-noremote] "message for the git update"' | |
exit 1 | |
fi | |
# the first argument will be the message we want to add to the git commit | |
if [ "$1" == "-noremote" ]; then | |
echo "Message for Git Update: $1" | |
git add . | |
git commit -m "$1" | |
else | |
echo "Message for Git Update: $1" | |
git add . | |
git commit -m "$1" | |
git push heroku master | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod +x standard_git_heroku
cp standard_git_bash /usr/local/bin
Using the above will be helpful for not having to copy this every time or remember which folder the script is stored in.