Skip to content

Instantly share code, notes, and snippets.

@darshilv
Last active July 26, 2016 18:10
Show Gist options
  • Save darshilv/4d272f025f0610428939663418cb8745 to your computer and use it in GitHub Desktop.
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
#!/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
@darshilv
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment