Git, on the other hand, is a modern, distributed way of implementing version control, where developers can work on their own local copies of code and history in offline mode. Developers can work offline on their local clone of code. Each developer has a local copy of code and entire history, and they work on their changes with this local repository. They can commit their code to the local repository. They can connect to the central repository for synchronization of their local repository on a per-need basis. This allows every developer to work on any file, since they would be working on their local copy. Branching in Git doesn't create another copy of the original code and is extremely fast to create.
Git works well with a smaller team. With larger teams, there's a substantial overhead to manage multiple pull requests to merge the code onto a central repository. It also works best for short-term projects, as this way, the history wouldn't get too large to be downloaded and manageable on every developer's local repository. Branching and merging is a breeze with advance options.
Git is the recommended way of using source control because of the rich functionality it provides. We'll use Git as the repository for our sample application in this book.