Skip to content

Instantly share code, notes, and snippets.

@EscVector
Created November 20, 2024 22:22
Show Gist options
  • Save EscVector/34430d3987cedeb609a257c5aafdb871 to your computer and use it in GitHub Desktop.
Save EscVector/34430d3987cedeb609a257c5aafdb871 to your computer and use it in GitHub Desktop.
Reset Github History to a Specifc Time
### This fully erases git hub history
### Make sure to backup/copy files to a safe place before running
SET GIT_AUTHOR_DATE="2024-11-18 16:44:44"
SET GIT_COMMITTER_DATE="2024-11-18 16:44:44"
git clone https://github.com/BitKind/repo-to-reset.git
cd repo-to-reset
git checkout --orphan datafreedom
git rm -rf .
copy C:\Users\projects\original-repo-to-reset C:\Users\projects\repo-to-reset
git add *
git commit -m "A Fresh Start"
git branch -M main
git push --force origin main
git log --pretty=fuller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment