Node Body | Modules Unraveled
Before we jump into using Git, it's good to know what version control is in general. Basically, version control is a way to track changes to a file or set of files in a project over time. Tracking your changes gives you the ability to revert to a previous version of a file or previous point in time for the whole project if something ever goes wrong. A version control system also makes it much easier for a team of developers to work on the same project without worrying about changes conflicting with changes by other team members. You are also able to track down bugs and see who last modified a file that is causing an issue, and when they did, so that you can fix the issue quickly.
Git is a distributed version control system, which means that each developer working on the project has a complete copy of the project and its history, known as a repository. Every time a set of changes are deemed complete a commit, or snapshot, is taken of the repository. These snapshots can be pushed to a central repository where other developers can pull the changes associated with that snapshot into their local copy of the project.
Using Git can improve your workflow even if you're a solo developer simply for the fact that it allows you to make updates or changes, and then if something goes wrong, roll those changes back to the previous, working copy. It also improves release flow, because you can make changes locally, and then commit them and push the entire set of changes to a remote server at once, without having to remember all of the steps you took to get to that final state.