How to switch branch in Git

Views: 161 Ask New Question


On By

1 Answer


  1. If it is an existing branch run the following command to switch to branch

    git checkout <branch_name>
    
  2. If it's a new branch you want to create, run the following command

    git checkout -b <branch_name>
    
On By


Answer This Question