Undo the Bad Commit
A commit added a security backdoor — undo it cleanly.
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/site has two commits. The last one sneaked DEBUG_BACKDOOR=on into config.txt.
Tasks:
- Undo the last commit so
config.txtno longer containsDEBUG_BACKDOOR - Keep the real setting (
port=8080) - Use
git revert(safe on shared history) orgit reset— your choice
Commands to learn: git log, git revert, git reset
Run check when done.