Files
30-seconds-of-code/snippets/git/s/switch-to-branch.md
2023-05-07 16:07:29 +03:00

416 B

title, type, language, tags, cover, dateModified
title type language tags cover dateModified
Switch to a branch snippet git
branch
bridge 2021-04-13T21:10:59+03:00

Switches to an existing branch.

  • Use git checkout <branch> to switch to the specified branch.
  • Note: In newer versions of git, you can also use git switch <branch>.
git checkout <branch>
git checkout patch-1 # Switches to the branch named `patch-1`