From the course: Introduction to Career Skills in Software Development

Explore version control systems - Python Tutorial

From the course: Introduction to Career Skills in Software Development

Explore version control systems

- Programmers use version control systems to make updates to their code safely. Version control is the practice of tracking and managing changes to software code. Version control systems, or VCS, are software tools that help software teams manage code changes over time. You can think of it as an account ledger. Each transaction, whether it's a deposit or withdrawal, is tracked. And each transaction contains information about the date, the amount, and the payee. Version control software behaves similarly. It keeps track of every change to the code. In a special kind of database, information is stored about what files changed, who changed them, when, and the purpose of the change. Version control is an essential part of a programmer's everyday practice. I don't know anyone who develops without it. But why not? What are the benefits of using version control? First, having the history of changes allows you to go back if you make a mistake. Recall, writing code is a lot of trial and error. You're bound to make mistakes. So having version control is your safety net. Second, it allows multiple programmers to work on the project simultaneously while minimizing conflicts. Modern VCS lets programmers create copies of the code and make modifications that don't prevent the other programmers on the team from doing the same. Then, once everyone is ready, they can safely combine or merge their changes. And finally, having the code changes annotated helps with troubleshooting when a bug is discovered. Like our account ledger analogy, if the balance goes in the negative, you can find out which transaction was the culprit. Similarly, when there is a bug in the code, you can use the log of changes from your VCS to debug the cause. One of the most popular version control systems today is Git. Git is free and open source. It exploded in popularity due to its branching model. A branching model defines the rules for making isolated code changes and then having those changes brought back into the main project. Git's branching model allows you to have multiple local branches that can be entirely independent of each other. And then, Git makes it fast and easy to merge those changes back into the main branch or discard them altogether. It's up to you. Version control systems help software teams work faster and smarter. It's an essential practice of modern-day software development.

Contents