Skip to content

Instantly share code, notes, and snippets.

@jmaupetit
Created September 26, 2013 21:25
Show Gist options
  • Save jmaupetit/6720791 to your computer and use it in GitHub Desktop.
Save jmaupetit/6720791 to your computer and use it in GitHub Desktop.
Remove git history and preserve submodules
# Taken from http://stackoverflow.com/a/13102849
git checkout --orphan newBranch
git add -A # Add all files and commit them
git commit
git branch -D master # Deletes the master branch
git branch -m master # Rename the current branch to master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment