I know this isn’t solicited advice, but I would recommend against using this wrapper script. It isn’t saving you much, it’s skipping things you probably ought to be doing, it’s doing things you probably don’t want to do, and it’s preventing you from actually learning how to use git all the while, which is a pretty useful skill to have.
A better process for updating your git repo is to first run git status in your directory with configuration files:
% git status
Look at the files that have changed, and look at the files that aren’t under version control yet (“untracked”). Don’t blindly add everything with “git add .”, that will just cruft up your repo over time. Are there new files you want to version control? Then add them with git add . But you don’t need to version control old logs or other cruft. Keep your repo clean with only what you would need if you had to start fresh.
Then, for each file that has changed, do:
% git diff <filename>
and look at what has actually changed. Make sure it’s a change you want to keep. Only then commit it with:
% git commit -m "describe changes" <filename>
If you have a change that’s logically coherent but spans several files, e.g., you added a new device and got it customized and into your groups, try to group those into one commit.
If you spot things that were intended to be temporary and want to “undo” the changes in that file, or you got yourself into a problem that you want to back out of, go back to your last committed version with
% git checkout <filename>
Repeat until git status is clean. Then push your repo back to github:
% git push origin master
Going through this process and learning how to use revision control tools is worth your time, especially if you want to get into any more involved scripting or programming.