I tried to get a former copy of my code by using the git checkout
command. Before using this though, I committed the latest version of the code using git commit
.
After using git checkout
to a previous version, I made changes to the code. Git now informs me that because I've made changes I can no longer revert to that most recent version that I had committed.
I don't care about the changes I made to this code I checked out, I just want to get back to the most recent version of the code. How do I do this?
Using the command git log
no longer shows that most recent version before the checkout to a previous version.