Skip to content

Instantly share code, notes, and snippets.

@fraserharris
Created March 26, 2012 02:31
Show Gist options
  • Save fraserharris/2202508 to your computer and use it in GitHub Desktop.
Save fraserharris/2202508 to your computer and use it in GitHub Desktop.
git bronch - branch & checkout in one command
# git bronch - branch & checkout in one command
# > git bronch blah
# Add to .gitconfig or use command: git config alias.bronch = ...
[alias]
bronch = !"f() { git branch $1 && echo \"Created branch '$1'\" && git checkout $1; }; f"
@trumbitta
Copy link

Ok here's the noob's question: how is this different from git checkout -b ?

@fraserharris
Copy link
Author

Looks like i'm the noob here. I looked at man branch but not man checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment