Skip to content

Instantly share code, notes, and snippets.

@dch
Created February 25, 2014 10:17
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 dch/9206335 to your computer and use it in GitHub Desktop.
Save dch/9206335 to your computer and use it in GitHub Desktop.
`git orphan` sets up a new git branch with no parent commit. Needs git 1.8 at least, maybe earlier versions.
#!/bin/sh
git checkout --orphan $* && git rm -rf .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment