Lesson03
beginnerCreate Your First Branch
Goal
Create branches with git branch and list them.
This repository has two commits on main. Create branches for upcoming work, and watch new labels appear in the Repository Graph without anything else changing.
Objectives
0/4- Create a branch named
feature/login. (Current objective) feature/loginpoints at the same commit asmain. Find both labels in the graph. (Not started)- Create a second branch named
bugfix/header. (Not started) - Stay on
main. Creating a branch does not switch to it. (Not started)
Your task nowStep 1 of 4
Create a branch named feature/login.
Need help?
Reference
Create a branch
$ git branch feature/login
Silent on success. The new branch points at the commit you are on, and you stay on your current branch.
List branches
$ git branch
* main feature/login
The * marks the branch HEAD points to, the one you are on.
Preparing your workspace…
Repository Graph
Click a commit to inspect it
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.
