I googled about this and a lot of articles showing how to see changes in either last few days or last commits.
What I really want is to see the last change to a file regardless when and which commit.
Lets say, I have FileA and FileB
commit 1: changed FileA and FileB
commit 2~99: changed FileB
What I want to see is what was the last change to FileA without knowing which commit affected FileA.
This is particularly useful (at least for me) when I git pull a shared project, I see a big list of files changed by a number of commits, I am interested what changes have been made to some of the files, but it's kind of hard to do.
I would simply try
git log -1 -p -- path/to/your/file
Like git help says:
-<n>
Limits the number of commits to show. Note that this is a commit
limiting option.
[--] <path>...
Show only commits that are enough to explain how the files that
match the specified paths came to be. See "History Simplification"
below for details and other simplification modes.
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