Moving from one branch to another in Git is as easy as 123. The enabling tool here is the _git checkout _command. The general command is

git checkout branch_name

where branch name is the 'destination branch'.

The following command switches us from our current master _branch into our new '_testing' branch:

git checkout testing

NOTE: The name of the current branch from which the pointer moves is not included in the command to check out. This is not a mistake; it's accurate as seen ;-)

This moves the HEAD to point to the testing branch:


HEAD points to another branch when you switch branches


results matching ""

    No results matching ""