Is there a way to list the commit's author in `git rebase -i` (interactive)?

Viewed 5583

When I do a git rebase -i on a branch shared with a co-worker, I often want to just rebase my own commits. However, because the interactive rebase tool doesn't add the author information to the rebasing file (all t gives is the commit hash and description), I wind up having to go check commits in another tab to see if they are mine or not.

Is there any way to give git rebase -i a --format flag (or something like it), to make it include the author?

3 Answers
git -c "rebase.instructionFormat=(%an <%ae>) %s" rebase -i COMMIT_HASH

Interactive output is going to look as follows:

pick b596a7b (Nik Sumeiko <email@example.com>) Refactors type checking utilities
pick c8b815f (Attila Kerekes <email@example.com>) Implements commit message linting

Edit your .gitconfig to add:

[rebase]
    instructionFormat = %s [%an]

That will show the short commit message and then the author name in square brackets.

Related