I have a file, lets say, test.txt. Lets say that its empty file and I committed it, so my first commit would just be an empty file. lets say sha for that is 2d37f7
Now Lets say I edited the file and added some text "hello world" in the file and I committed that file. Now I have another hash with hello world version and lets say that that hash is eec1598
Now when I do git log, I see this
eec1598 (my last commit on top)
2d37f7 (my first empty file)
Now lets say that I want to go back to the first file, I do something like this
git checkout 2d37f7 test.txt
when now I check the file, its empty , which is good. But when I do
git log test.txt
it shows me the same thing as above
eec1598 (my last commit on top)
2d37f7 (my first empty file)
At this point I don't know which version of test.txt is current version. How do I find that out?
thanks