Restoring git commit after reverting from remote repo
I was a bit careless and i pointed my stream deployment to a remote repo
that had a bunch of old commits. Now my leader pulled down those old
changes and they were deployed to my worker nodes. I reverted back from
the remote repo but still have no access to my old commits which should
still be living on the leaders local git. How do i fix this?
Best Answer
-
Hello you should be able to use the “git reset --hard” command to reset the changes back to the last known good commit.
To identify the last known good commit, you can use “git reflog”.
Then you can reset to that commit with “git reset --hard <hash of last good commit>”.
0
Answers
-
Hello you should be able to use the “git reset --hard” command to reset the changes back to the last known good commit.
To identify the last known good commit, you can use “git reflog”.
Then you can reset to that commit with “git reset --hard <hash of last good commit>”.
0