Reputation: 162
accidentally I push code in GitHub by --force flag. After pushed the code, I got an url it looks like this,
compare/3b97dc6ae39ff9416863cbcdfa0a65dd315db7cd..b234e255fc5462a7c46e48ebf720b4f97f54480d?diff=split
now I want to revert back to 3b97dc6ae39ff9416863cbcdfa0a65dd315db7cd
this commit. But I'm not able to move. I tried with this,
git reset --hard 3b97dc6ae39ff9416863cbcdfa0a65dd315db7cd
fatal: Could not parse object '3b97dc6ae39ff9416863cbcdfa0a65dd315db7cd'.
How could I revert back to this commit ? Can anyone please help to do that? TIA
Upvotes: 0
Views: 749
Reputation: 784
Try git fetch origin 3b97dc6ae39ff9416863cbcdfa0a65dd315db7cd
before git reset
.
Upvotes: 2