gitgit-log

View the change history of a file using Git versioning


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?


Solution

  • For a graphical view, use gitk:

    gitk [filename]
    

    To follow the file across file renames:

    gitk --follow [filename]