Skip to content

Instantly share code, notes, and snippets.

@ZachSaucier
Created April 2, 2024 19:08
Show Gist options
  • Save ZachSaucier/1006229fb8b2f42ee4ceb96728599efe to your computer and use it in GitHub Desktop.
Save ZachSaucier/1006229fb8b2f42ee4ceb96728599efe to your computer and use it in GitHub Desktop.
Create and navigate to a new git branch from any other branch
gb() {
git checkout main
git pull
git branch "$1"
git checkout "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment