How to switch branches with checkout?
git checkout branch_name
To switch to a branch called branch_name with the checkout command use git checkout branch_name
.
git branch -v
* main 9b3e5ec readme
test-branch 120f7ab Adding tests
git checkout test-branch
Switched to branch 'test-branch'
See git checkout to learn more about it.