Branch, then checkout
main has one commit already (app.txt, committed before you arrived).
Sitting in the working directory, untracked, is feature.txt - the start of
some new work that should NOT land on main directly.
Your task: create a branch called feature and switch onto it, then
stage and commit feature.txt there with the exact message Add feature.txt.
When you're done, main should still have only its original commit -
feature should have one more.
You'll practice:
git checkout -b <name> - create a branch and switch onto it in one step
- Keeping new work isolated on its own branch instead of committing to
main
Related reading: The Feature-Branch Workflow - Why Nobody Touches main →