Skip to content

Instantly share code, notes, and snippets.

@ronaldosena
Created October 3, 2018 11:15
Show Gist options
  • Select an option

  • Save ronaldosena/fd073eec73646eb5584d6a222137c73a to your computer and use it in GitHub Desktop.

Select an option

Save ronaldosena/fd073eec73646eb5584d6a222137c73a to your computer and use it in GitHub Desktop.
#!/bin/bash
# drop this in the destination folder then run:
# $ chmod 755 hello_world
# usage:
# $ ./gitgo "your message"
# to run this scrip in any context, drop the file in some folder, like ~/bin
# then add to path:
# $ PATH=$PATH:~/bin
if [ "$1" != "" ]; then
git add .
git commit -m "$1"
git push origin master
else
git add .
git commit -m "Default commit file"
git push origin master
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment