1. Create a branch
git branch <name> creates a new pointer at the current commit without moving HEAD to it.
git branch featureTyporithm · easy
Step 1 of 8 · intro card
Branching
A branch is a movable pointer to a commit. git branch <name> creates one, git switch moves HEAD to it, switch -c does both at once, branch -d deletes a merged branch, and branch -a lists all branches including remotes. Branches are cheap.
In Git a branch is just a lightweight, movable pointer to a commit — creating one only writes a tiny reference, so branches are cheap to make and throw away.
git branch feature creates the pointer but leaves you where you are; git switch feature then moves HEAD onto it so new commits extend that branch. git switch -c hotfix combines create-and-switch into a single command.
When a branch's work has been merged, git branch -d feature deletes it. git branch -a lists every branch you have, including remote-tracking branches, so you can see the full picture.
A branch is a movable pointer to a commit.
git switch -c creates and switches in one step.
git branch -d deletes a merged branch.
git branch feature
git switch feature
git switch -c hotfix
git branch -d feature
git branch -aConnect each part of the code to the concept before you type.
git branch <name> creates a new pointer at the current commit without moving HEAD to it.
git branch featuregit switch moves HEAD to the named branch so new commits land there.
git switch featureswitch -c creates a branch and switches to it in one step.
git switch -c hotfixbranch -d safely deletes a branch once its work has been merged.
git branch -d featurebranch -a lists every branch, including remote-tracking ones.
git branch -aRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.