tags:

views:

35

answers:

2

How can I view history on a particular file (which may have been deleted already in the current trunk)?

Also, what diff tool do you suggest for mac?

+2  A: 

Do this to view the history for a file, even if it has been deleted from the current HEAD:

git log -- <filename>

So if you deleted xyz.py a few revisions ago but would like to view its history, then you would do:

git log -- xyz.py
David Underhill
If the file has been renamed in the past, you may want to use `git log --follow -- <path>`
Chris Johnsen
A: 

Also, what diff tool do you suggest for mac?

The Mac dev tools come with FileMerge, which is a decent diff tool. There's a command-line interface to it called opendiff (also ships with the dev tools).

mipadi