Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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