189: Git: Keep Track Of Your Files As They Change. Part 4.
Take Up Code - En podcast af Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes
Kategorier:
Programming involves change and managing that change is the only way to make sense of it. You will learn about distributed repositories in this episode and how that enables you to work differently. The file renaming and copying techniques that I described earlier form a crude form of version control but even more important is the fact that everything is local. All the backups are on your computer. That makes it difficult to share them with other people. Maybe you could instead put the files on another computer that other people also have access to. That’s really what makes a computer a server instead of a client workstation. Anytime you have a computer designed to perform some service and make that service available for other computers to use, such as serving files, you turn that computer into a server. Listen to the full episode to understand how Git makes use of servers to store repositories in a central location but at the same time treats all repos as essentially the same. You can also read the full transcript below. Transcript You’ll learn about distributed repositories in this episode and how that enables you to work differently. The file renaming and copying techniques that I described earlier form a crude form of version control but even more important is the fact that everything is local. All the backups are on your computer. That makes it difficult to share them with other people. Maybe you could instead put the files on another computer that other people also have access to. That’s really what makes a computer a server instead of a client workstation. Anytime you have a computer designed to perform some service and make that service available for other computers to use, such as serving files, you turn that computer into a server. It’s possible to turn your own computer into a server. A server doesn’t always have to be an expensive and powerful computer sitting in a rack in an air-conditioned room with rows of other computers. Any time you have a computer connected to a network and it makes some service available for other computers to use, then you have a server. Now, you wouldn’t want to use your personal computer for a server for a variety of reasons, but the point is that you could if you really wanted to. One important aspect that makes a good server is availability. Since you don’t know when somebody will want to use the services offered by a server computer, it should be ready to accept requests at any time. You don’t normally turn servers off at the end of each day and you rarely even want to restart them. A good version control system should be available for your entire team to use from each team member’s computer. And almost all version control systems can be run on a server computer so they’ll be available for use anytime somebody needs them. But there’s a big difference in how some of these systems are designed. The traditional way is more like taking your private backup files and placing them on a server so they’ll be available from a single location. The system will likely make copies of the specific versions of each file that you want to work with on your local computer. It’s just faster to have the files sitting on your own computer than to always have to send the contents over the network anytime you want to read or open a file. Some version control systems even try to get very elaborate by making your files appear to be copied locally but they really don’t exist on your own computer until the moment you try to access them. It doesn’t really matter though if your version control system actually makes copies of the files on your local computer or just seems to do this. Because if you ever lose the network connection to that server, then you’ll lose access to any files that you don’t already have. This also means you lose access to other versions of your files. So if you’re working on a laptop c