Skip to content

Instantly share code, notes, and snippets.

@marcuswestin
Created February 6, 2015 16:59
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcuswestin/b44af9f71f85365959b2 to your computer and use it in GitHub Desktop.
Save marcuswestin/b44af9f71f85365959b2 to your computer and use it in GitHub Desktop.
Git checkout --force (checkout, or create if it doesn't exist)
(git show-branch foo1 &>/dev/null) && (git checkout foo1) || (git checkout -b foo1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment