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

As of git 2.6, git rebase -i uses rebase.instructionFormat (default %s) to generate the text after pick NNNNN....

Since this is a git-config item, you can set the value per repository, for yourself in general, or even using the -c option on a one-time basis.

EDIT:

As jdknight suggested in the comments, the specific command for this would be:

git config --add rebase.instructionFormat "(%an <%ae>) %s" 

or, to avoid item repetition, as oalders suggested, you can instead set the config globally:

git config --global rebase.instructionFormat "(%an <%ae>) %s"

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

Interactive output is going to look as follows:

pick b596a7b (Nik Sumeiko <[email protected]>) Refactors type checking utilities
pick c8b815f (Attila Kerekes <[email protected]>) 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.

Tags:

Git

Git Rebase