Is there a way to easily commit a file to git if it has updated?
I want to take a list of files in a directory, write it to a text file, and commit it to git if it's changed. I assume this would involve a shell script that creates the list, then runs git add [file]
then git commit -m "Updating"
but I want to make sure it's not going to break if I run it in a cron script.
Thanks!