Ever wish you could see the history for just a single function in ? You can use:

git log -L :function:file

But git doesn’t know how to find Swift functions by default. You can help it by following these instructions to add “Better diff hunk headers with Swift”:

Then the following example would show you all the changes to the login function in APIClient.swift:

git log -L :login:APIClient.swift

· · Ivory for Mac · 2  · 24  · 81