Lesson04
beginnerMerge Feature Into Main
Goal
Run the whole feature-branch workflow, from new branch to merged feature.
This is how most teams work every day: start a branch, commit the work there, then merge it into main once it is done.
search.js is written and waiting in your working tree.
Objectives
0/4- Create a branch named
feature/searchand switch to it. (Current objective) - Commit
search.jsonfeature/search. (Not started) - Switch back to
main. (Not started) - Merge
feature/searchintomain. (Not started)
Your task nowStep 1 of 4
Create a branch named feature/search and switch to it.
Need help?
Reference
The feature-branch workflow
1. git switch -c feature/search start a branch for the work 2. git add + git commit commit on the branch, main stays untouched 3. git switch main go back to the branch that receives the work 4. git merge feature/search bring the feature in
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.
