Skip to content

Instantly share code, notes, and snippets.

@ambethia
Created January 20, 2009 23:42
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 ambethia/49748 to your computer and use it in GitHub Desktop.
Save ambethia/49748 to your computer and use it in GitHub Desktop.
Removing the history from a new branch
git symbolic-ref HEAD refs/heads/newbranch
rm .git/index
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