Git Version Control

Git Version Control

Now, we’re starting to consider how you might develop and maintain a Python package. A good way to do this is to use git.

From the website

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is used extensively to develop and share code. A git repository (or repo) is just a directory which contains information generated by git. You can initialize version control in a direcotry by running git init from the command line. This will put the directory (and any sub-directories) under version control.

Git allows for version control meaning you can keep track of how code changes over time, and work with multiple versions (called branches) at the same time.

This helps with collaboration (collaborators can do their independent work, then merge their code bases). You can communicate with a remote server to back-up and coordinate changes.

It can also help with fixing bugs (say you made some changes that severely break functionality. Then you can revert to a previous state).

You can also tag the repository with different versions.

git