When you begin to learn the basics of the Linux command line, you also find that you want to automate commands by gathering them in scripts. This will prove to be a valuable time-saver as you grow your Linux skills.
But when you have scripts that are longer than, say 20 lines, and you go back to modify and build on them, the complexity increases. Whether you are the only one working on and using the scripts, or if it is a team effort, you will want to use revision control. This helps you track changes to the scripts over time and can also save time so you don’t have to ask yourself, “What on earth was I thinking when I added command x?”
This is where Git comes in handy. Git is a distributed version control system. As such, you use it to track changes in computer files. It is often associated with developers and their toolset, but as the IT industry grows more concerned with durability and transparency, Git also becomes a useful tool for IT Operations staff and data scientists. Just to name a few.
Use Git to control changes and improve transparency
Even if you write and use your scripts exclusively, as your scripts begin numbering in the hundreds (not uncommon), you will find that you need to recall why some changes were made. Git comes to the rescue in this case. Of course, that depends on whether the git commit comments are descriptive and clear.
Read more about Git here (its homepage) and here (Wikipedia page).
Happy scripting! And go ahead and create your first git repository.