Skip to content

Instantly share code, notes, and snippets.

@marksharrison
Last active September 8, 2019 22:56
Show Gist options
  • Save marksharrison/07b297bdf94fe4a4c9ab90496babf2ec to your computer and use it in GitHub Desktop.
Save marksharrison/07b297bdf94fe4a4c9ab90496babf2ec to your computer and use it in GitHub Desktop.
Delete commit history from repository, except latest.
$ rm -rf .git
$ git init
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin <github-uri>
$ git push -u --force origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment