Skip to content

Instantly share code, notes, and snippets.

@singhmohancs
Forked from CaroManel/git-reset-remote.sh
Last active August 7, 2023 08:03
Show Gist options
  • Save singhmohancs/1b4294a85d62e52449871ab6c1918f34 to your computer and use it in GitHub Desktop.
Save singhmohancs/1b4294a85d62e52449871ab6c1918f34 to your computer and use it in GitHub Desktop.
delete all commits, empty repository
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