This shows how to create a branch from each tool. You only needed to use one.
- Go to the repository's Code tab
- Open the branch dropdown (it says "main"; a screen reader reads it as "main branch")
- Type a new branch name like
fix/welcome-todoin the text field that opens. The same field filters existing branches and names a new one, so "no branches found" is expected - Select "Create branch: fix/welcome-todo from main". With a keyboard, press
Tabuntil you reach it (usually two presses, past the Tags tab), then pressEnterorSpace
The branch now exists on GitHub and is active. You can switch to it using the same dropdown.
git checkout -b fix/welcome-todoOr use the Source Control sidebar: click the branch name in the bottom-left status bar, then select "Create new branch."
- Click the Current Branch dropdown
- Click "New Branch"
- Enter the name
fix/welcome-todo - Confirm it is based on
main
gh repo clone <workshop-org>/learning-room-<your-username>
cd learning-room
git checkout -b fix/welcome-todoGood branch names are short and descriptive:
fix/welcome-todo-- fixing a TODO in welcome.mdfeature/add-schedule-link-- adding a new linkdocs/update-readme-- documentation change
All of these are valid. The convention type/description is common but not required.
The learning objective is understanding that branches let you work in isolation without affecting main. If you created any branch with any name, you completed this challenge.
Use these official references when you need the current source of truth for facts in this chapter.
Use this map to verify facts for each major section in this file.
- On github.com: GitHub Docs, home, GitHub Changelog, About Git, GitHub flow, About pull requests
- In VS Code (with Git): GitHub Docs, home, GitHub Changelog, About Git, GitHub flow, About pull requests
- In GitHub Desktop: GitHub Docs, home, GitHub Changelog, About Git, GitHub flow, About pull requests
- With GitHub CLI: GitHub Docs, home, GitHub Changelog, GitHub Copilot docs, Custom instructions support matrix, About custom agents
- Branch naming: GitHub Docs, home, GitHub Changelog, About Git, GitHub flow, About pull requests
- What matters: GitHub Docs, home, GitHub Changelog