Shorter, simpler alternative is to grep lines that start with something other than whitespace:
$ man git | grep '^\S'
GIT(1) Git Manual GIT(1)
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
GIT COMMANDS
HIGH-LEVEL COMMANDS (PORCELAIN)
LOW-LEVEL COMMANDS (PLUMBING)
GUIDES
CONFIGURATION MECHANISM
IDENTIFIER TERMINOLOGY
SYMBOLIC IDENTIFIERS
FILE/DIRECTORY STRUCTURE
TERMINOLOGY
ENVIRONMENT VARIABLES
DISCUSSION
FURTHER DOCUMENTATION
AUTHORS
REPORTING BUGS
SEE ALSO
GIT
NOTES
Git 2.32.0 06/06/2021 GIT(1)
Those extra lines can also be removed:
$ man git | grep '^\S' | sed '1d;$d'
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
GIT COMMANDS
HIGH-LEVEL COMMANDS (PORCELAIN)
LOW-LEVEL COMMANDS (PLUMBING)
GUIDES
CONFIGURATION MECHANISM
IDENTIFIER TERMINOLOGY
SYMBOLIC IDENTIFIERS
FILE/DIRECTORY STRUCTURE
TERMINOLOGY
ENVIRONMENT VARIABLES
DISCUSSION
FURTHER DOCUMENTATION
AUTHORS
REPORTING BUGS
SEE ALSO
GIT
NOTES
If you're already viewing it through less
(i.e. what happens when you just man git
), you can use &
to show just matching lines. IOW, you can type &^\S
and less
will show you just the headers (and first and last line). To go back to showing the whole manpage, you can type &
then Enter.
man-pages
source code ftp.iij.ad.jp/pub/linux/kernel/linux/docs/man-pages/Archive ... →man-pages-5.12.tar.xz
..SS
which none of the answers address, because those are formatted with a few leading blanks (before the prevailing left-margin of text).