Skip to content

Branching

git branch <branch-name> : Creates a new branch. git checkout <branch-name> : Switches to the specified branch. git checkout -b <branch-name> : Creates a new branch and switches to it. git checkout main : Switches to the main branch.