This collection of commits is called a repository. Early version control systems worked by storing all of those commits locally on your hard drive. What’s the distributed part? It’s probably easiest to answer that question by starting with a little history. As I mentioned earlier, Git will also allow you to return any file (or all files) to an earlier commit with little effort. In addition to showing you the log of changes you’ve made, Git also allows you to compare files between different commits. This provides a useful history of what work you have done and can really help pinpoint when a bug crept into the system. Git can show you the history of all of the commits and their commit messages. When you make a commit in Git, you add a commit message that explains at a high level what changes you made in this commit. When using Git, we refer to this saving of state as making a commit. Saving the state is similar to creating a backup copy of your working directory. Then, you may continue to edit the files and store that state as well. This means that you can tell your VCS (Git, in our case) to save the state of your files at any point. Let’s break that down a bit and look at what it means.Ī version control system (VCS) is a set of tools that track the history of a set of files. Git is a distributed version control system (DVCS). If you don’t, the excellent Pro Git book has a section on how to do that. This article assumes you already have Git installed on your system. We’ll look at how to create a repo, how to add both new and modified files, and how to navigate through your project’s history so you can “get back” to when your project was working. In this tutorial, I’ll walk you through what Git is, how to use it for your personal projects, and how to use it in conjunction with GitHub to work with other people on larger projects. ![]() Git is one of the most popular version control systems today. Have you ever worked on a Python project that stopped working after you made a change here or a PEP-8 cleanup there, and you weren’t quite sure how to get it back? Version control systems can help you solve that problem and other related ones. Watch it together with the written tutorial to deepen your understanding: Introduction to Git and GitHub for Python Developers Watch Now This tutorial has a related video course created by the Real Python team.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |