Checking out a branch¶
Switch from the default branch of a repository (working directory) to a new or existing one, syncing any file changes. All future actions are associated with this branch.
Context-aware checking out¶
During a checkout, gitz
inspects the repository for the existence of a branch and intelligently switches between creating a new one or checking out the existing reference.
If you were to print the output from the command, you would see a branch creation:
If you check out a branch that already exists, you will see a different output: