Created
January 28, 2023 02:27
-
-
Save HusseinLezzaik/5c149cd1694fa6f7dddbb0cecff15498 to your computer and use it in GitHub Desktop.
Bash script to automatically commit and push local changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gstatus=`git status --porcelain` | |
if [ ${#gstatus} -ne 0 ] | |
then | |
git add --all | |
git commit -m "Automated sync: $gstatus" | |
git pull --rebase | |
git push | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment