Skip to content

Instantly share code, notes, and snippets.

@taniarascia
Last active March 31, 2020 09:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save taniarascia/cb7d10cc3dbb5bcfaf974b2279cc5e37 to your computer and use it in GitHub Desktop.
Save taniarascia/cb7d10cc3dbb5bcfaf974b2279cc5e37 to your computer and use it in GitHub Desktop.
Track, commit, and push to git origin and development with bash script
#!/bin/bash
read -r -p 'Commit message: ' ${desc} # prompt user for commit message
git add . # track all files
git add -u # track all deleted files
git commit -m "$desc" # commit with message
git push origin master # push to origin
git push production master # push to development server
@Ultimater
Copy link

Had to change the first ${desc} to desc for it to work for me.
That prompt is really handy.

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