Yesterday I committed some changes in a file named Network.java. Today I pulled with rebase from the origin. Now the changes are gone in the file.
What is more interesting is that if I run git log -p
and search for Network.java, I see the commit with the changes. However, if I run git log -p -- <path to Network.java>
, then I don't see my commit (it shows a commit made a week ago).
What is the explanation?
You should run the same command with --full-history
. It is because Git compacts the history.
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