I committed my changes.
When I enter git log
I can see that it's there.
commit 5d6eebd2f064fc2ba59fdc55cdebb728e607de0e
Author: Imray <[email protected]>
Date: Thu Nov 13 22:16:30 2014 -0500
So now I make some silly gibberish changes in one of my files and save.
When I enter git checkout 5d6eebd2f064fc2ba59fdc55cdebb728e607de0e
my files should revert back to what they were when I committed them, but they are not. The gibberish is still there.
Does anyone know why this is happening? Am I missing something?
This is intended Git behavior. Try this
Explanation: Imagine you did some edits and now you realize you are on the wrong branch. Simply changing branches should not revert your changes then. You would have no way of getting them back.