0 votes
1 view
in Devops and Agile by (25.5k 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 (42.7k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...