Topic 2
Version Control
Calm Git use comes from recognizing file states and knowing which files should never enter the repository.
Basic file states
The most important file states are:
- tracked
- modified
- staged
- committed
- ignored
You do not need every Git concept at once. These states are enough to understand most day-to-day repository behavior.
Check status often
git status is the right command when you feel unsure.
git status
It tells you what changed, what is staged, and what still needs attention.
Ignore local clutter
Some files do not belong in version control, such as generated auxiliary files, local caches, or machine-specific clutter.
Use .gitignore to keep those files out of the repository. The goal is not to hide real work. The goal is to stop noisy local artifacts from polluting the history.
Identify the heavy local folders or generated files that should never enter version control.
Then create the .gitignore file in the project root so the ignore rules live beside the manuscript files.
Add the folder name or ignore pattern to .gitignore so Git knows that this path should stay local.
After you save the file, VS Code usually makes the ignored folder visibly dimmer in the explorer.
Once the ignore rule is active, those files should stay out of the repository view even after commit and push.
Before proceeding
If you can look at git status and explain which files are ready to commit, which are still local clutter, and which should be ignored, this page has done its job.