Switch Branches
Learn how to switch between branches in Git
Switch a branch
git checkout branch_name
This command switches to the branch_name branch. It changes the working directory to the branch specified. The changes in the working directory are based on the branch you switch to. The branch_name is the name of the branch you want to switch to.
Example: Switch to the main branch
git checkout main