Skip to content

Instantly share code, notes, and snippets.

@scottnath
Created March 4, 2015 21:57
Show Gist options
  • Select an option

  • Save scottnath/be44614cc38f5dec4948 to your computer and use it in GitHub Desktop.

Select an option

Save scottnath/be44614cc38f5dec4948 to your computer and use it in GitHub Desktop.
new clean git branch with --orphan
git checkout --orphan newbranch
git rm -rf .
rm -rf all-the-remaining-stuff-except-.git-directory
## should be a clean branch now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment