Lesson05
beginnerCommit on a Feature Branch
Goal
Keep new work on its own branch, so main stays untouched.
You have written login.js, but it is not ready for main yet. Commit it on a feature branch instead, then switch back to main and see what happens to the file.
Objectives
0/4- Create a branch named
feature/loginand switch to it. (Current objective) - Commit
login.jsonfeature/login. (Not started) mainstill points at Add homepage. Your commit is only on the feature branch. (Not started)- Switch back to
main, and notice thatlogin.jsleaves the working tree. (Not started)
Your task nowStep 1 of 4
Create a branch named feature/login and switch to it.
Need help?
Reference
What you are about to build
main stays on Add homepage while your work lives one commit ahead on feature/login.Preparing your workspace…
Repository Graph
Click a commit to inspect it
0 commits
Working Tree
Not a Git repository yet
No unstaged changes
Your working tree matches the staging area.
Staging Area
Files prepared for the next commit
No staged changes
Use git add to prepare files for your next commit.
Repository
Committed history
No commits yet
Use git commit to record staged changes.
