Last Updated: January 3, 2026
30 quizzes
Create a new branch from the currently checked-out commit without switching to it
git feature/refactor-authClick an option to fill the blank:
Move to an existing branch named feature/payment using the recommended modern command
git feature/paymentClick an option to fill the blank:
Create and immediately switch to a new branch called hotfix/header from your current commit using git switch
git switch - hotfix/headerClick an option to fill the blank:
Safely delete a fully merged local branch named feature/old-ui
git branch - feature/old-uiClick an option to fill the blank:
Rename the current branch to feature/new-dashboard
git branch -m feature/new-dashboardClick an option to fill the blank:
What does a branch represent in Git?
Which command is recommended for simply switching between branches in modern Git?
What does HEAD usually point to in a normal (non-detached) state?
Which situation will put you into a detached HEAD state?
After deleting a fully merged local branch with git branch -d feature/login, what happens to its commits?
Order the steps to create a new feature branch from main using git switch, work on it, and then return to main.
Drag and drop to reorder, or use the arrows.
Order the steps to safely delete a completed local feature branch after merging.
Drag and drop to reorder, or use the arrows.
Order the steps to inspect an old commit in detached HEAD and then preserve work done there.
Drag and drop to reorder, or use the arrows.
Order the steps to rename a local branch and update the remote to use the new name.
Drag and drop to reorder, or use the arrows.
You are currently on a branch called feature/login. What will this command print?
1git branch --show-currentHEAD currently points to branch main. What will this command print?
1git symbolic-ref --short HEADYou run this command while on branch bugfix/header-overlap. What is printed?
1git rev-parse --abbrev-ref HEADYou are in a detached HEAD state at commit abc1234. What will this command print?
1git rev-parse --abbrev-ref HEADFind the incorrect command in this branching workflow that aims to create and switch to a new branch with git switch.
Click on the line(s) that contain the bug.
git switch maingit switch -bgit statusgit branchIdentify the incorrect command in this attempt to delete a local branch after work is done.
Click on the line(s) that contain the bug.
git switch maingit merge feature/cleanupgit branch --delete --force feature/cleanupYou want to rename a local branch and then push it. Find the mistake.
Click on the line(s) that contain the bug.
git switch feature/typo-naemgit branch -m feature/correct-namegit push origin --delete feature/correct-namegit push origin feature/correct-nameMatch each branch-related command with its purpose.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match the HEAD-related concepts to their descriptions.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each branch switching command to its typical use.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Complete the commands to create a branch from main, push it to origin, and then list all branches.
git switch git switch -b git push origin git branch Click an option to fill blank 1:
Complete the commands to delete a remote branch and then list only remote branches.
git push origin --delete git branch Click an option to fill blank 1:
Complete the commands to recover from detached HEAD by creating and switching to a new branch at the current commit.
git new-experimentgit new-experimentClick an option to fill blank 1:
Select the line that shows HEAD is currently attached to the main branch.
Click on the line to select.
feature/auth* main bugfix/navbarClick the part that indicates the current branch in this git status output.
Click on the line to select.
On branch feature/searchYour branch is up to date with 'origin/feature/search'. nothing to commit, working tree cleanSelect the line that indicates you are in a detached HEAD state.
Click on the line to select.
HEAD detached at abc1234nothing to commit, working tree clean