Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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