Is it possible to use the “minimal” algorithm for interactive adding?
问题 Git doesn't always choose hunk boundaries correctly, when calculating a changeset from snapshots. git diff has a --diff-algorithm option that allows some tweaking in this regard; git diff --minimal sometimes gives better results than git diff alone. Is there a way to get the same optimised changeset layout also for git add -p (which basically shows the diff hunks interactively)? It doesn't seem to allow the --diff-algorithm option. 回答1: TL;DR version git -c diff.algorithm=minimal add -p