There was no lecture or tutorial this week.
Our topic for this week is the Git version control system.
In the past decade, Git has been the primary tool that programmers around the world use for publishing and sharing code and for collaborating on software projects. It is an immensely popular and practical tool. You should all become fluent in using Git.
To learn about Git, read the following chapters of the book Pro Git by Scott Chacon and Ben Straub. You can read the book online for free and/or download a PDF copy of the book.
Getting Started
Git Basics
Git Branching (through the section "Branch Management")
The book will teach you how to use Git from the command line, which is an important skill. Various graphical interfaces are also available. In particular, most IDEs have some form of Git support. For example, Visual Studio Code includes Git integration that works quite nicely. So you will probably also want to learn how to use Git from within your IDE of choice.
Git is often used for sharing work between programmers, but you may want to consider using Git even for projects that you work on by yourself. In a typical workflow, you will commit a change every time you add a new feature, fix a bug or otherwise reach a stable stopping point. Using Git on your own projects brings these advantages:
You have a record of all changes you have ever made. When you delete code, you don't have to keep it commented out in your source files in case you might ever need it again, as some programmers do. Instead, you can easily go back to any old version.
Every time you commit a change and push to the server, you have backed up your work, insuring yourself against losing it if something goes wrong on your machine.
At any moment you can easily see what you have changed since the last commit, i.e. the last point when you know your code worked reasonably. If you realize you are going in a bad direction, you can revert your changes.
You can have multiple branches where you can make experimental changes or work on several versions of your program simultaneously.
You can easily copy your code onto multiple machines for testing. For example, if you are developing on Linux but want to verify that your code works on Windows, you can pull your code from the git server to a Windows machine. If you try your code there and need to make a few small changes, you can push them back to the server, and then pull them back onto your main development machine. You could try to do this without version control, by copying zip files around, but the process would be tedious and error-prone.