Git: show more context when using git add -i or git add -e?

Question:

I’m selectively committing parts of a large file and I’d like to see more context around each hunk. Is this possible?

Answer:

Short answer: no.

git diff has the -U<n> option which allows you to customize the number of lines to show around a change. For example, git diff -U5 ... will show 5 lines of context. As far as I can tell, there is no such option available for the diff display in the interactive mode.

Leave a Reply