Git Basics
Git is a distributed version control system that tracks changes to files, records history, and lets teams move safely between versions while they develop software.
- Explain why version control is essential in software development.
- Describe commits, repositories, branches, and the working tree.
- Use Git to save progress and revisit earlier states safely.
Version control keeps a complete history of a project, so you can see what changed, when it changed, and who changed it.
A repository stores the project history, while the working tree is the current editable copy on your computer.
Commits are snapshots of progress. Good commit messages make the history easier to understand later.
Git is distributed, so every developer can keep a full copy of the repository history on their own machine.
A student updates a project layout, tests the changes, and commits the improvement with a message such as "Refine homepage layout". Later, the history can show exactly when the redesign happened.
- What is the difference between the working tree and the repository history?
- Why are small commits easier to manage than large ones?
- Git records project history as commits.
- A repository is a full versioned copy of the project.
- Clear commit history makes future work easier.