Merging a branch back in
Same starting point as last time: main has one commit (app.txt), and
feature.txt is sitting untracked in the working directory, waiting to become
work done on a branch.
This time, don't stop at committing on the branch - bring that work back into
main where it belongs.
Your task: branch off main into feature, commit feature.txt there
with the exact message Add feature.txt, switch back to main, then merge
feature into it. When you're done, main should contain feature.txt too.
You'll practice:
- The full branch → commit → switch back → merge loop
git merge <branch> - folding another branch's commits into the one you're on
Related reading: The Feature-Branch Workflow - Why Nobody Touches main →