I did a commit and push on my git repo.
I then needed to rollback that commit which I did like this:
git reset --hard b1b5768c9687455f01bab242ff177a5ee403104f
Is it possible to find the SHA of the first commit? and go back to it again?
Use git log -g or git reflog to see the reflog -- the log of all of the values that a given HEAD has taken on. Think of it as a chronological history of HEAD rather than a checkin history.
Once you find it you can git reset back to it (possibly after creating a branch specifically to point to it) or cherry pick part of it that you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With