Skip to content

Instantly share code, notes, and snippets.

@bioshazard
Last active November 4, 2025 23:11
Show Gist options
  • Save bioshazard/be7b63d21db5494e844c9a4e21e8381a to your computer and use it in GitHub Desktop.
Save bioshazard/be7b63d21db5494e844c9a4e21e8381a to your computer and use it in GitHub Desktop.
Git New Branch from origin
git config --global alias.nb '!f() { git fetch origin && git checkout -b "$1" origin/${2:-master} --no-track; }; f'
git config --global --type bool push.autoSetupRemote true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment