linux - Failsafe Automated Git Update/Add/Commit -
i have website need commit system generated files , folders existing git repository via linux command line. have automated process monitors folder new bash scripts , runs them. website creates scripts , saves them folder.
i keep getting issues has changed on either remote repo or local 1 stopping git completing following commands
git pull --rebase origin git add [repo path updated file(s)]/* git commit -m "commit message" git push master
i need bullet proof process run , can forget it. right now, permissions issues on files pulled down, or merge conflicts, etc... keep getting repo out of sync. how can bullet proof commands above pull down remote changes , commit new ones necessary?