Skip to content

Instantly share code, notes, and snippets.

@CaroManel
Created March 2, 2017 03:41
Show Gist options
  • Save CaroManel/3c4bb446a0a95433b1ca154d4a771e0a to your computer and use it in GitHub Desktop.
Save CaroManel/3c4bb446a0a95433b1ca154d4a771e0a to your computer and use it in GitHub Desktop.
Reset remote git repository to delete all commits
rm -r .git
git init
(create files)
git add -A
git commit -m 'Initial commit'
git remote add origin <url>
git push --force --set-upstream origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment