Repo Reset If we want to delete all of our commits history, but keep the code in its current state, try this: # Check out to a temporary branch: git checkout --orphan TEMP # Commit the files: git commit -m "Initial commit"