Find out when a keyword (method name, constant) is added or removed in git

Posted . Visible to the public.

When refactoring it is sometimes useful to see when a method or constant was introduced or removed.

git log -G'method_name'
git log -G'ConstantName'

If you see that a method is no longer used then you are safe to remove it. You can also see the context around why it was added which could make it easier to refactor.

Rob Williams
Keywords
git
Posted by Rob Williams to Foxsoft (2015-06-25 20:20)