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]
Summary of other answers after reading through them and playing a bit:
The usual command line command would be
git log --follow --all -p dir/file.c
But you can also use either gitk (gui) or tig (text-ui) to give much more human-readable ways of looking at it.
gitk --follow --all -p dir/file.c
tig --follow --all -p dir/file.c
Under debian/ubuntu, the install command for these lovely tools is as expected :
sudo apt-get install gitk tig
And I'm currently using:
alias gdf='gitk --follow --all -p'
so that I can just type gdf dir
to get a focussed history of everything in subdirectory dir
.