Create and Push a Git Branch with VS Code and NVDA
Create a branch, commit a README update, compare it with main, and verify your new branch on GitHub using NVDA and the keyboard.
By the end of this lesson, you will have a branch named update-readme-with-workflow-processes on your computer and on GitHub. That branch will contain a committed README update, while main keeps its original README.
This is part three of Getting Started with GitHub. Start with Create and clone your first GitHub repository, then practice staging, committing and pushing changes.
The recording uses Windows, WSL Ubuntu, VS Code, NVDA and Brave. GitLens is installed, but this lesson uses the integrated terminal for Git commands. You need an existing cloned repository and permission to push to its GitHub remote. Git must be installed in the environment where your terminal runs; Git for Windows and Git inside WSL are separate installations.
Watch the video
Start from a clean main branch
Open your repository in VS Code. Use Ctrl+grave to focus the integrated terminal, then run git status. Confirm you are on main and the working tree is clean. If you have uncommitted work, finish or deliberately save it before following this comparison.
One clarification to the recording: origin is a remote name, not a branch name. origin/main is a locally stored remote-tracking reference. git status does not contact GitHub to check for new commits. Refresh that information before relying on an ahead/behind comparison:
git fetch origin
git status
Fetch does not merge changes into your files. If main is behind or diverged, resolve that state before continuing this clean-start exercise.
Create the new branch
git switch -c update-readme-with-workflow-processes
git status
Lowercase -c creates a new branch and switches to it. Confirm the reported branch name. Its files initially match main because you have not made any new commits.
If the branch already exists, git switch -c stops. Use git switch update-readme-with-workflow-processes to return to it, or choose a different name for a fresh exercise. git checkout -b also creates a new branch. Uppercase git checkout -B can reset an existing branch and is not needed here.
Edit and save the README
Return to README.md and add the following section:
## Practice workflow
Use this repository to practice Git and GitHub with VS Code, the keyboard, and NVDA.
1. Create a new branch before making a change.
2. Edit and save the README.
3. Review and commit the change.
4. Switch between branches to compare committed versions.
5. Push the new branch to GitHub and verify the updated README.
Changes committed on the practice branch stay separate from main until they are merged.
Save with Ctrl+S. In the recording, NVDA reads a circle in the VS Code title when the editor has unsaved changes. NVDA+T reads the title. The circle disappears after saving, but the saved file can still be modified relative to Git.
Stage and commit your change
Return to the terminal and run git status. The README should appear under changes not staged for commit. Alt+F2 opens VS Code’s Accessible View for reviewing terminal output in this setup.
The recording uses git add . from the repository root, which stages changes under that directory. For this README-only exercise, select the intended file explicitly:
git add README.md
git status
Confirm the README appears under changes to be committed. Review the staged changes before committing, then run:
git commit -m "Updated readme with info on practice workflow."
git status
A clean working tree means your changes are committed locally. It does not mean they have been pushed to GitHub.
Prove that main is unchanged
The recording uses checkout to switch between existing branches. Start by returning to main:
git checkout main
Read the README again. It should contain the original version without the Practice workflow section. Now return to your branch:
git checkout update-readme-with-workflow-processes
Read the README again. The Practice workflow section returns. You can also use git switch main and git switch update-readme-with-workflow-processes for these existing-branch switches.
Commit before switching in this exercise so you compare committed versions. Uncommitted changes can carry across branches or prevent switching; they are not automatically isolated when you change branches.
Push and verify on GitHub
git push -u origin update-readme-with-workflow-processes
git status
The push sends the branch to GitHub. Lowercase -u sets its upstream tracking relationship. Check the push output for success; authentication and write permission are required.
Open your repository on GitHub and refresh with Ctrl+R. In NVDA browse mode, use NVDA+Ctrl+F to find “branch.” In the recording, a “2 branches” link opens the branch lists. Use headings or landmarks to reach the lists, T to move to a table, and Ctrl+Alt+Down Arrow to move through table rows.
Open the update-readme-with-workflow-processes link. On that branch’s repository page, navigate through headings to Practice workflow in the README. Read its contents to confirm the update arrived.
GitHub’s layout and branch counts can vary. The essential check is to open the intended branch and read its updated README.
Your checkpoint and next lesson
You now have a committed README update on a separate branch, have pushed that branch to GitHub, and have verified that main retains its original version. Nothing in this lesson merges the branch into main.
The next lesson promised in the video is comparing the two branches with GitLens. This video was published September 18, 2026; this written companion was prepared September 19.