Next.js Discord

Discord Forum

All my commits are gone from my nextjs repo

Unanswered
Somali posted this in #help-forum
Open in Discord
SomaliOP
I know this might not be a nextjs thing and more of a git problme but I don't know what to do. As I was pushing the project, git said corrupt loose object. I stupidly deleted the folder in wsl and forced the new commit which overwrote my past 30 commits and I'm at commit 1 again. Is there any way to undo that commit and got back to my usual git history?

2 Replies

SomaliOP
Ragdoll
use git reflog and checkout to that specific commit that u need