1 Maintain a history of your script improvements – Force yourself to continuously improve
Git will help you to get a clear overview of how your scripts have evolved. Maybe you need to go back a version or two and fork a script from there. If you have added proper comments in your scripts, than you and others can follow your reasoning easily.
A funny thing happens when you start adding code in Git repositories and update them as you add or change code. You become more prone to improving your code as you know which parts needs some more work. Maybe even a #ToDo note somewhere that signifies a totally new feature – That #ToDo comment will nag you more when you have a Git repository and constantly go there to check it out. Add the reasoning in reason number 2 and you also feel the peer pressure from others to continue building on your useful scripts.
2 Others might take over your scripts for regular usage
Think of the Linux users that you will work with and that will need the same toolchest that you have. Show some team spirit and share your work, of course with proper attribution to you as a script programmer. This gives you a lot of respect
3 Understand the fallacy of “the perfect script” thinking
There are no perfect scripts. No silver bullets to any IT problem of a larger scale. In the Linux world we are also used to many ways to solve simple tasks on the commandline in many ways. This statement can then be used to argue that your solution has no need to be hidden away or not to be covered by version control. With version control you introduce the idea of newer and better versions of your Bash script. It is a nice trick to show yourself and others that yes, improvements and new ideas are welcome.
4 DevOps and Test-Driven Development ask for iteration and cross-border approaches
These two paradigms really show that more collaboration is expected between subject matter experts, whether a Linux user, a Python scripter, or a LAMP Engineer (to give only three examples). We get inspiration from each other’s solutions to tasks on the commandline. These solutions are stored in Bash scripts. By using Git you show that you are open to the idea of sharing your scripts as well as reject the notion of the “write once, all good, don’t argue” type of mentality.
5 Git is used to version control more than you think
These days you will find that Git is used by many more than programmers. From technical writers to scripters and data scientists. The idea of applying version control and having central repositories that can be forked and worked on by many people is simly very appealing. It also deals with the number one silo: The expert that sits on all the knowledge but that is so tremendously useful to others as well.