Skip to content

Instantly share code, notes, and snippets.

@richardschoen
Created May 27, 2020 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardschoen/d49681b5d625c09fab9cd0b09f0cb256 to your computer and use it in GitHub Desktop.
Save richardschoen/d49681b5d625c09fab9cd0b09f0cb256 to your computer and use it in GitHub Desktop.
Single sample bash command to stage, commit, push and pull changes to remote git repository with timestamped comment
#!/bin/bash
# This script can be used to commit changes to git repo and push to
# remote repo all in one command.
TODAY=$(date)
HOST=$(hostname)
git add .
git commit -m "Changes committed: $TODAY from $HOST"
git push
git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment