git checkout¶
Command Usage¶
git checkout [ARGUMENT] [BRANCH]
Required Arguments:
- [BRANCH]
Name of the branch you wish to change out. This will either be main, master, or the name of a branch you want to work on.
Optional Arguments:
- -b
Create a new branch when checking it out. This is helpful if you know your current branch doesn’t exist, and you want to create it on checkout. NOTE: Your branch will not show up in GitHub until you push your first commit - this is when the branch gets pushed to GitHub as well.