What are the key areas of a Git project? (Working Directory, Staging Area, Repository)
- Working Directory: This is where you make changes to the files. It's your local
workspace where you're actively editing code.
- Staging Area (Index): This is like a holding area where you prepare files before
committing them to the repository. You can choose which changes to add here.
- Repository: This is where Git stores the project’s history (commits). It's the
permanent record of your project's evolution.
Real-World Example:
When you're editing code, it starts in the working directory. After editing, you "stage" your
changes (using git add), which moves them to the staging area. Once you're ready to
save your changes permanently, you commit them to the repository using git commit.
Follow: