From the course: Programming Foundations: Version Control with Git (2020)

What is Git?

From the course: Programming Foundations: Version Control with Git (2020)

Start my 1-month free trial

What is Git?

- Git is a popular version control system, but it's not the only one. There are other popular options such as Subversion of Mercurial. To understand why programmers use Git over other VCSs, let's talk about the different types. While all VCSs are used to track and create a history of changes, there are some differences depending on the type of model they follow, centralized or distributed. Subversion is an example of a centralized VCS. All of the project files and the version history must be stored in a central server. To make changes, you check out the files that you need and work on it locally on your computer. Once you finish, your changes are pushed back into the central server to update the project files and the version history. Using a centralized system is much better than manually making different copies of your files, but there are some restrictions. To work with the files, you must be connected to the server, and since you only check out the files that you need to make changes to, you won't have a full copy of the project files locally, so if something happens to the server or you can't connect to the server, you won't be able to access your project files. Git was released in 2005 and belongs to the newer distributed version control model which addresses some of these issues. In a distributed system, the main difference is you can have a copy of the entire directory and version history stored locally on your computer. You can also use a remote server to designate a central location. That way it can be accessed from any computer, or be shared with others, but it's not required. The only time you need to be connected to the server is to sync the changes between your local and your remote directories. Version control systems such as Subversion are still in use, but many developers have moved to a distributed model because of its flexibility. And while there are also other distributed version control systems, this course will focus on how to use Git to manage our projects.

Contents