How do I view the history of an individual file with complete details of what has changed?
git log -- [filename]
shows me the commit history of a file, but how do I see the file content that changed?
2023-01-19
How do I view the history of an individual file with complete details of what has changed?
git log -- [filename]
shows me the commit history of a file, but how do I see the file content that changed?
This lets Git generate the patches for each log entry:
git log -p -- filename
See git help log
for more options — it can actually do a lot of nice things. :)
To get just the diff for a specific commit, use
git show HEAD
or specify any other revision by identifier.
To browse the changes visually:
gitk