Skip to content

Instantly share code, notes, and snippets.

@mrtazz
Created November 23, 2009 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrtazz/241199 to your computer and use it in GitHub Desktop.
Save mrtazz/241199 to your computer and use it in GitHub Desktop.
git symbolic-ref HEAD refs/heads/newbranch
rm .git/index
git clean -fdx
<do work>
git add your files
git commit -m 'Initial commit'
is now
git checkout --orphan newbranch
git clean -fdx
<do work>
git add your files
git commit -m 'Initial commit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment