What is Git
Git is a distributed version control system for managing source code. A version control system records and saves changes as you modify files, allowing you to restore a previous version of your work at any time.
Without a version control system for your code, you are likely stuck manually saving multiple versions of your files using different dates and names (e.g., 12-02-2022-code.php; 12-03-2022-code.php). This method is time-consuming and impractical when dealing with hundreds of files.

It also doesn’t contextualize changes so that others know what was altered, when, and by whom. With multiple team members working on the same file, overwriting can quickly become a problem. It can also become challenging to know which file is the latest version. And so we turn to version control systems to solve these problems (and more).
With Git, you can easily access your source code’s revision history. You can see how the version has changed and who made the changes. Because the entire Git history is stored on a shared repository, Git can prevent unintentional overwrites from an older version.

In short, a version control system like Git makes it easy to
- Keep track of code history
- Collaborate on code as a team
- See who made which changes