Skip to content

Instantly share code, notes, and snippets.

@JenZhao
Created October 19, 2017 18:43
Show Gist options
  • Save JenZhao/786c7f6c4ba03a2cf865e07645c5d9ef to your computer and use it in GitHub Desktop.
Save JenZhao/786c7f6c4ba03a2cf865e07645c5d9ef to your computer and use it in GitHub Desktop.
Delete all your commit history and keep the code in its current state
git checkout --orphan latest_branch
git add -A
git commit -am "initial commit"
git branch -D master
git branch -m master
git push -f origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment