Showing entries with tag "patch".

Found 1 entries

Git: Show all changes to a given file

If you want to view the history of all the changes you've made to a specific file in Git you can use the log command in Git. This will show you all the commits that touched that file, and the associated commit message.

git log README.md

If you want to see a diff/patch for each commit you can run:

git log --follow --patch README

This can be very useful to track down when a specific piece of code went into (or was taken out of) a file. Be careful as this command only shows you the diff/patch for the file you request. If the commit contains changes to other files you will not see those unless you view the full commit.

Leave A Reply