Skip to content

Instantly share code, notes, and snippets.

@aandvalenzuela
Created March 5, 2023 21:31
Show Gist options
  • Select an option

  • Save aandvalenzuela/9ba7071e1140c763511df880f286704b to your computer and use it in GitHub Desktop.

Select an option

Save aandvalenzuela/9ba7071e1140c763511df880f286704b to your computer and use it in GitHub Desktop.
# List all branches in the repository
git branch
# Switch to a branch
git switch branch-name
# Create and switch to a new branch
git switch -c new-branch-name
# In contrast to the deprecated command
git checkout -b new-branch-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment