Skip to content

Instantly share code, notes, and snippets.

@2016rshah
Last active January 20, 2017 23:59
Show Gist options
  • Save 2016rshah/1ecc7d7871eb7786ebb366d101d8ed13 to your computer and use it in GitHub Desktop.
Save 2016rshah/1ecc7d7871eb7786ebb366d101d8ed13 to your computer and use it in GitHub Desktop.
submitPush() {
git add .
git commit -m "$1"
git push origin master
cwd=$(pwd)
cd ../
git add .
git commit -m "$1"
git push origin master
cd $cwd
}
@2016rshah
Copy link
Author

  • vim ~/.bash_profile
  • paste this code in
  • Force quit terminal (Command-Q) and re-open it to reload the bash_profile
  • Always run by doing submitPush "My commit message" from the innermost directory (Gheith's directory)

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