Repository navigation
pr-2293/jvns/diff-v1
tagged this
03 Nov 15:33
From: Julia Evans <julia@jvns.ca> The top piece of feedback users always give about man pages is always that they want better examples that are relevant to them. The EXAMPLES section's structure has remained mostly unchanged since 2007, which was before we knew how people were going to use `git diff`. Update it with ways of using `git diff` that are popular with Git users, gathered by asking Mastodon users for their most commonly used incantations. Add a note about the EXAMPLES section in the DESCRIPTION since otherwise readers are unlikely to know it's there. `git diff` is a command where it's more important than usual to have examples because the command has so many different forms. Some design choices: - Use `--merge-base` instead of `...` since several users said they find .. vs ... confusing. It's much more obvious what --merge-base does. - Use a table format instead of the footnote-style formatting since the footnote style is quite difficult to follow. It's easier to follow if the description is right next to the command it's describing. - Link the options in the examples to make them faster to look up - Use sub-subsection headings for the different parts to make them more visually distinct and easy to scan. Co-Authored-By: Marie Claire LeBlanc Flanagan <hello@marieflanagan.com> Signed-off-by: Marie Claire LeBlanc Flanagan <hello@marieflanagan.com> Signed-off-by: Julia Evans <julia@jvns.ca> Submitted-As: https://lore.kernel.org/git/pull.2293.git.1793720007182.gitgitgadget@gmail.com