Branch & Merge
Create a feature branch, commit to it, and merge it back into main.
A intermediate Git challenge worth 10 points. Solve it hands-on in a real Git environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: The repo in /tmp/proj is on main with one commit. You need to build a feature in isolation.
Tasks:
- Create and switch to a branch named
feature - Add a file
feature.txt(any content) and commit it - Switch back to
mainand mergefeatureinto it
Commands to learn: git switch -c, git commit, git merge
Run check when done.