3 ms·
Version control is not the same thing as a backup. They're completely different, and you need both. Git is hard to explain to someone who hasn't lived it. It's
by mechanical_fish 18y ago
Version control is not the same thing as a backup. They're completely different, and you need both.
Git is hard to explain to someone who hasn't lived it. It's as if you've got a button that saves the state of your entire project, instead of just saving one file at a time. Each time you press the button (which is called committing or making a commit) you save all the changes that you've made to any file in your project directory or its subdirectories, along with your name and the time and the date and a note describing what you did. The resulting series of commits is better than just a bunch of backups: it's a very long series of annotated undos which (ideally) stretches back to the beginning of your project. Making a commit is much, much easier than copying your entire project directory over and over, so you end up with a lot more date-stamped backups than you ever would otherwise.
Only it's better, because this history is editable: you can rearrange the order of your commits, break one commit apart into two or more, smash several of them together, edit their descriptive messages, undo some of them while leaving others, group a bunch of them together and mail them to someone else as patch files, and so on. You can edit the history of your software's development after the fact to turn it into a clear story that other people can understand.
But wait, there's more! You can create multiple different versions of your project ("branches") and work on them in parallel. With one command you can switch from working on the production version of your code to a development version, or to a crazy experimental version. And you can move commits from one version to another. Of course, every developer has their own private copy of each of these branches, and commits can be moved from one developer to another. If two developers change the same file in incompatible ways, the system warns you so that you don't inadvertently destroy each other's work.
You need to find some screencasts of someone using git for something real. I'm not sure what to recommend. Maybe someone else can link to one. If I can't find any, I've been thinking of trying to make some myself.