Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in DevOps and Agile by (29.3k points)
edited by

How can I view the change history of an individual file in Git, complete details with what has changed?

I have got as far as:

git log -- [filename]

which shows me the commit history of the file, but how do I get at the content of each of the file changes?

I'm trying to make the transition from MS SourceSafe and that used to be a simply right-click → show history

1 Answer

0 votes
by (50.2k points)

Instead of using 

Git log -- [file-name]

You can use 

Gitk [file-name]

Here gitk is a graphical history viewer 

To follow filename use 

Gitk --follow [file-name] 

It enables you to view the change history of a file.

Browse Categories

...