Five places
As a programmer I think of Git as divided into five places:
- The work area
- The index (staging area)
- The local repository
- The remote repository
- The stash
Let's begin by examining each of these in turn.
The work area
The work area is where your current files are. That is, if you were to open Windows Explorer and navigate to the directory you cloned to, you would see the version of the program you were currently working on. If you were to open Visual Studio 2019, these are the files that would be in the Solution Explorer. Again, the work area is where your current files are; if you open Visual Studio on your project, the files in the work area are what you will see. As you change branches (see below) the work area is updated with the appropriate files. This can be one of the hardest concepts in Git: when you change branches you change the files that are in your work area – that is, the files for that branch...