[Insight-developers] git log automatic "--follow"
Brad King
brad.king at kitware.com
Tue Mar 22 10:39:22 EDT 2011
On 03/21/2011 04:52 PM, Bradley Lowekamp wrote:
> As the very useful commit message says:
>
> Rename the files without modification to preserve enough information for
> "git blame -M" and "git log --follow" to connect moved files to their
> old location and history.
I'm glad you find that note useful. I knew that lots of people would
end up logging back to the mass rename commits and wonder how to see
the rest of the history ;)
I think "git blame" will follow the renames without using -M but I have
not checked whether that depends on a recent Git or not.
> I am wondering if there is a way to turn these options on by default in
> my config for ITK. The "Configuration" section of man git-log did not
> reveal what I was looking for.
The --follow option works only when logging a single file so it does not
make sense to add it all the time. You could create an alias:
git config alias.logfile "log --follow"
and then use
git logfile some/file.txt
-Brad K
More information about the Insight-developers
mailing list