Spot the Workflow Mistake
Find the Mistake Medium
Question
What is wrong with committing directly to main on a team project?
Code
git checkout main
echo "new feature" >> feature.txt
git add .
git commit -m "Add feature"
Hint
Team projects use feature branches and pull requests.
Explanation
Committing directly to main is a bad practice on team projects because it bypasses code review, makes the history harder to follow, and risks breaking the stable branch. The correct workflow is: create a feature branch, commit there, push, open a pull request, review, then merge into main.
Related Resources
Related Lessons
Related Cheatsheets
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.