{
    "content": [
        {
            "type": "text",
            "text": "# git-ls-files (man)\n\n## NAME\n\ngit-ls-files - Show information about files in the index and the working tree\n\n## SYNOPSIS\n\ngit ls-files [-z] [-t] [-v] [-f]\n[-c|--cached] [-d|--deleted] [-o|--others] [-i|--ignored]\n[-s|--stage] [-u|--unmerged] [-k|--killed] [-m|--modified]\n[--resolve-undo]\n[--directory [--no-empty-directory]] [--eol]\n[--deduplicate]\n[-x <pattern>|--exclude=<pattern>]\n[-X <file>|--exclude-from=<file>]\n[--exclude-per-directory=<file>]\n[--exclude-standard]\n[--error-unmatch] [--with-tree=<tree-ish>]\n[--full-name] [--recurse-submodules]\n[--abbrev[=<n>]] [--format=<format>] [--] [<file>...]\n\n## DESCRIPTION\n\nThis command merges the file listing in the index with the actual working directory list, and\nshows different combinations of the two.\n\n## TLDR\n\n> Show information about files in the index and the working tree.\n\n- Show deleted files:\n  `git ls-files {{-d|--deleted}}`\n- Show modified and deleted files:\n  `git ls-files {{-m|--modified}}`\n- Show ignored and untracked files:\n  `git ls-files {{-o|--others}}`\n- Show untracked files, not ignored:\n  `git ls-files {{-o|--others}} --exclude-standard`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (23 subsections)\n- **OUTPUT**\n- **FIELD NAMES**\n- **EXCLUDE PATTERNS**\n- **SEE ALSO**\n- **GIT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "git-ls-files",
        "section": "",
        "mode": "man",
        "summary": "git-ls-files - Show information about files in the index and the working tree",
        "synopsis": "git ls-files [-z] [-t] [-v] [-f]\n[-c|--cached] [-d|--deleted] [-o|--others] [-i|--ignored]\n[-s|--stage] [-u|--unmerged] [-k|--killed] [-m|--modified]\n[--resolve-undo]\n[--directory [--no-empty-directory]] [--eol]\n[--deduplicate]\n[-x <pattern>|--exclude=<pattern>]\n[-X <file>|--exclude-from=<file>]\n[--exclude-per-directory=<file>]\n[--exclude-standard]\n[--error-unmatch] [--with-tree=<tree-ish>]\n[--full-name] [--recurse-submodules]\n[--abbrev[=<n>]] [--format=<format>] [--] [<file>...]",
        "tldr_summary": "Show information about files in the index and the working tree.",
        "tldr_examples": [
            {
                "description": "Show deleted files",
                "command": "git ls-files {{-d|--deleted}}"
            },
            {
                "description": "Show modified and deleted files",
                "command": "git ls-files {{-m|--modified}}"
            },
            {
                "description": "Show ignored and untracked files",
                "command": "git ls-files {{-o|--others}}"
            },
            {
                "description": "Show untracked files, not ignored",
                "command": "git ls-files {{-o|--others}} --exclude-standard"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-c",
                "long": "--cached",
                "arg": null,
                "description": "Show all files cached in Git’s index, i.e. all tracked files. (This is the default if no -c/-s/-d/-o/-u/-k/-m/--resolve-undo options are specified.)"
            },
            {
                "flag": "-d",
                "long": "--deleted",
                "arg": null,
                "description": "Show files with an unstaged deletion"
            },
            {
                "flag": "-m",
                "long": "--modified",
                "arg": null,
                "description": "Show files with an unstaged modification (note that an unstaged deletion also counts as an unstaged modification)"
            },
            {
                "flag": "-o",
                "long": "--others",
                "arg": null,
                "description": "Show other (i.e. untracked) files in the output"
            },
            {
                "flag": "-i",
                "long": "--ignored",
                "arg": null,
                "description": "Show only ignored files in the output. Must be used with either an explicit -c or -o. When showing files in the index (i.e. when used with -c), print only those files matching an exclude pattern. When showing \"other\" files (i.e. when used with -o), show only those matched by an exclude pattern. Standard ignore rules are not automatically activated; therefore, at least one of the --exclude* options is required."
            },
            {
                "flag": "-s",
                "long": "--stage",
                "arg": null,
                "description": "Show staged contents' mode bits, object name and stage number in the output."
            },
            {
                "flag": "",
                "long": "--directory",
                "arg": null,
                "description": "If a whole directory is classified as \"other\", show just its name (with a trailing slash) and not its whole contents. Has no effect without -o/--others."
            },
            {
                "flag": "",
                "long": "--no-empty-directory",
                "arg": null,
                "description": "Do not list empty directories. Has no effect without --directory."
            },
            {
                "flag": "-u",
                "long": "--unmerged",
                "arg": null,
                "description": "Show information about unmerged files in the output, but do not show any other tracked files (forces --stage, overrides --cached)."
            },
            {
                "flag": "-k",
                "long": "--killed",
                "arg": null,
                "description": "Show untracked files on the filesystem that need to be removed due to file/directory conflicts for tracked files to be able to be written to the filesystem."
            },
            {
                "flag": "",
                "long": "--resolve-undo",
                "arg": null,
                "description": "Show files having resolve-undo information in the index together with their resolve-undo information. (resolve-undo information is what is used to implement \"git checkout -m $PATH\", i.e. to recreate merge conflicts that were accidentally resolved)"
            },
            {
                "flag": "-z",
                "long": null,
                "arg": null,
                "description": "\\0 line termination on output and do not quote filenames. See OUTPUT below for more information."
            },
            {
                "flag": "",
                "long": "--deduplicate",
                "arg": null,
                "description": "When only filenames are shown, suppress duplicates that may come from having multiple stages during a merge, or giving --deleted and --modified option at the same time. When any of the -t, --unmerged, or --stage option is in use, this option has no effect. -x <pattern>, --exclude=<pattern> Skip untracked files matching pattern. Note that pattern is a shell wildcard pattern. See EXCLUDE PATTERNS below for more information. -X <file>, --exclude-from=<file> Read exclude patterns from <file>; 1 per line. --exclude-per-directory=<file> Read additional exclude patterns that apply only to the directory and its subdirectories in <file>. Deprecated; use --exclude-standard instead."
            },
            {
                "flag": "",
                "long": "--exclude-standard",
                "arg": null,
                "description": "Add the standard Git exclusions: .git/info/exclude, .gitignore in each directory, and the user’s global exclusion file."
            },
            {
                "flag": "",
                "long": "--error-unmatch",
                "arg": null,
                "description": "If any <file> does not appear in the index, treat this as an error (return 1). --with-tree=<tree-ish> When using --error-unmatch to expand the user supplied <file> (i.e. path pattern) arguments to paths, pretend that paths which were removed in the index since the named <tree-ish> are still present. Using this option with -s or -u options does not make any sense."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "Show status tags together with filenames. Note that for scripting purposes, git-status(1) --porcelain and git-diff-files(1) --name-status are almost always superior alternatives; users should look at git-status(1) --short or git-diff(1) --name-status for more user-friendly alternatives. This option provides a reason for showing each filename, in the form of a status tag (which is followed by a space and then the filename). The status tags are all single characters from the following list: H tracked file that is not either unmerged or skip-worktree S tracked file that is skip-worktree M tracked file that is unmerged R tracked file with unstaged removal/deletion C tracked file with unstaged modification/change K untracked paths which are part of file/directory conflicts which prevent checking out tracked files ? untracked file U file with resolve-undo information"
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "Similar to -t, but use lowercase letters for files that are marked as assume unchanged (see git-update-index(1))."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Similar to -t, but use lowercase letters for files that are marked as fsmonitor valid (see git-update-index(1))."
            },
            {
                "flag": "",
                "long": "--full-name",
                "arg": null,
                "description": "When run from a subdirectory, the command usually outputs paths relative to the current directory. This option forces paths to be output relative to the project top directory."
            },
            {
                "flag": "",
                "long": "--recurse-submodules",
                "arg": null,
                "description": "Recursively calls ls-files on each active submodule in the repository. Currently there is only support for the --cached and --stage modes. --abbrev[=<n>] Instead of showing the full 40-byte hexadecimal object lines, show the shortest prefix that is at least <n> hexdigits long that uniquely refers the object. Non default number of digits can be specified with --abbrev=<n>."
            },
            {
                "flag": "",
                "long": "--debug",
                "arg": null,
                "description": "After each line that describes a file, add more data about its cache entry. This is intended to show as much information as possible for manual inspection; the exact format may change at any time."
            },
            {
                "flag": "",
                "long": "--eol",
                "arg": null,
                "description": "Show <eolinfo> and <eolattr> of files. <eolinfo> is the file content identification used by Git when the \"text\" attribute is \"auto\" (or not set and core.autocrlf is not false). <eolinfo> is either \"-text\", \"none\", \"lf\", \"crlf\", \"mixed\" or \"\". \"\" means the file is not a regular file, it is not in the index or not accessible in the working tree. <eolattr> is the attribute that is used when checking out or committing, it is either \"\", \"-text\", \"text\", \"text=auto\", \"text eol=lf\", \"text eol=crlf\". Since Git 2.10 \"text=auto eol=lf\" and \"text=auto eol=crlf\" are supported. Both the <eolinfo> in the index (\"i/<eolinfo>\") and in the working tree (\"w/<eolinfo>\") are shown for regular files, followed by the (\"attr/<eolattr>\")."
            },
            {
                "flag": "",
                "long": "--sparse",
                "arg": null,
                "description": "If the index is sparse, show the sparse directories without expanding to the contained files. Sparse directories will be shown with a trailing slash, such as \"x/\" for a sparse directory \"x\". --format=<format> A string that interpolates %(fieldname) from the result being shown. It also interpolates %% to %, and %xx where xx are hex digits interpolates to character with hex code xx; for example %00 interpolates to \\0 (NUL), %09 to \\t (TAB) and %0a to \\n (LF). --format cannot be combined with -s, -o, -k, -t, --resolve-undo and --eol. -- Do not interpret any more arguments as options. <file> Files to show. If no files are given all files which match the other specified criteria are shown."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "git-read-tree",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/git-read-tree/1/json"
            },
            {
                "name": "gitignore",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/gitignore/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-c, --cached",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--cached"
                    },
                    {
                        "name": "-d, --deleted",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--deleted"
                    },
                    {
                        "name": "-m, --modified",
                        "lines": 3,
                        "flag": "-m",
                        "long": "--modified"
                    },
                    {
                        "name": "-o, --others",
                        "lines": 2,
                        "flag": "-o",
                        "long": "--others"
                    },
                    {
                        "name": "-i, --ignored",
                        "lines": 6,
                        "flag": "-i",
                        "long": "--ignored"
                    },
                    {
                        "name": "-s, --stage",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--stage"
                    },
                    {
                        "name": "--directory",
                        "lines": 3,
                        "long": "--directory"
                    },
                    {
                        "name": "--no-empty-directory",
                        "lines": 2,
                        "long": "--no-empty-directory"
                    },
                    {
                        "name": "-u, --unmerged",
                        "lines": 3,
                        "flag": "-u",
                        "long": "--unmerged"
                    },
                    {
                        "name": "-k, --killed",
                        "lines": 3,
                        "flag": "-k",
                        "long": "--killed"
                    },
                    {
                        "name": "--resolve-undo",
                        "lines": 4,
                        "long": "--resolve-undo"
                    },
                    {
                        "name": "-z",
                        "lines": 3,
                        "flag": "-z"
                    },
                    {
                        "name": "--deduplicate",
                        "lines": 15,
                        "long": "--deduplicate"
                    },
                    {
                        "name": "--exclude-standard",
                        "lines": 3,
                        "long": "--exclude-standard"
                    },
                    {
                        "name": "--error-unmatch",
                        "lines": 8,
                        "long": "--error-unmatch"
                    },
                    {
                        "name": "-t",
                        "lines": 34,
                        "flag": "-t"
                    },
                    {
                        "name": "-v",
                        "lines": 3,
                        "flag": "-v"
                    },
                    {
                        "name": "-f",
                        "lines": 3,
                        "flag": "-f"
                    },
                    {
                        "name": "--full-name",
                        "lines": 3,
                        "long": "--full-name"
                    },
                    {
                        "name": "--recurse-submodules",
                        "lines": 8,
                        "long": "--recurse-submodules"
                    },
                    {
                        "name": "--debug",
                        "lines": 4,
                        "long": "--debug"
                    },
                    {
                        "name": "--eol",
                        "lines": 14,
                        "long": "--eol"
                    },
                    {
                        "name": "--sparse",
                        "lines": 17,
                        "long": "--sparse"
                    }
                ]
            },
            {
                "name": "OUTPUT",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "FIELD NAMES",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "EXCLUDE PATTERNS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-ls-files - Show information about files in the index and the working tree\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git ls-files [-z] [-t] [-v] [-f]\n[-c|--cached] [-d|--deleted] [-o|--others] [-i|--ignored]\n[-s|--stage] [-u|--unmerged] [-k|--killed] [-m|--modified]\n[--resolve-undo]\n[--directory [--no-empty-directory]] [--eol]\n[--deduplicate]\n[-x <pattern>|--exclude=<pattern>]\n[-X <file>|--exclude-from=<file>]\n[--exclude-per-directory=<file>]\n[--exclude-standard]\n[--error-unmatch] [--with-tree=<tree-ish>]\n[--full-name] [--recurse-submodules]\n[--abbrev[=<n>]] [--format=<format>] [--] [<file>...]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This command merges the file listing in the index with the actual working directory list, and\nshows different combinations of the two.\n\nSeveral flags can be used to determine which files are shown, and each file may be printed\nmultiple times if there are multiple entries in the index or if multiple statuses are\napplicable for the relevant file selection options.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-c, --cached",
                        "content": "Show all files cached in Git’s index, i.e. all tracked files. (This is the default if no\n-c/-s/-d/-o/-u/-k/-m/--resolve-undo options are specified.)\n",
                        "flag": "-c",
                        "long": "--cached"
                    },
                    {
                        "name": "-d, --deleted",
                        "content": "Show files with an unstaged deletion\n",
                        "flag": "-d",
                        "long": "--deleted"
                    },
                    {
                        "name": "-m, --modified",
                        "content": "Show files with an unstaged modification (note that an unstaged deletion also counts as\nan unstaged modification)\n",
                        "flag": "-m",
                        "long": "--modified"
                    },
                    {
                        "name": "-o, --others",
                        "content": "Show other (i.e. untracked) files in the output\n",
                        "flag": "-o",
                        "long": "--others"
                    },
                    {
                        "name": "-i, --ignored",
                        "content": "Show only ignored files in the output. Must be used with either an explicit -c or -o.\nWhen showing files in the index (i.e. when used with -c), print only those files matching\nan exclude pattern. When showing \"other\" files (i.e. when used with -o), show only those\nmatched by an exclude pattern. Standard ignore rules are not automatically activated;\ntherefore, at least one of the --exclude* options is required.\n",
                        "flag": "-i",
                        "long": "--ignored"
                    },
                    {
                        "name": "-s, --stage",
                        "content": "Show staged contents' mode bits, object name and stage number in the output.\n",
                        "flag": "-s",
                        "long": "--stage"
                    },
                    {
                        "name": "--directory",
                        "content": "If a whole directory is classified as \"other\", show just its name (with a trailing slash)\nand not its whole contents. Has no effect without -o/--others.\n",
                        "long": "--directory"
                    },
                    {
                        "name": "--no-empty-directory",
                        "content": "Do not list empty directories. Has no effect without --directory.\n",
                        "long": "--no-empty-directory"
                    },
                    {
                        "name": "-u, --unmerged",
                        "content": "Show information about unmerged files in the output, but do not show any other tracked\nfiles (forces --stage, overrides --cached).\n",
                        "flag": "-u",
                        "long": "--unmerged"
                    },
                    {
                        "name": "-k, --killed",
                        "content": "Show untracked files on the filesystem that need to be removed due to file/directory\nconflicts for tracked files to be able to be written to the filesystem.\n",
                        "flag": "-k",
                        "long": "--killed"
                    },
                    {
                        "name": "--resolve-undo",
                        "content": "Show files having resolve-undo information in the index together with their resolve-undo\ninformation. (resolve-undo information is what is used to implement \"git checkout -m\n$PATH\", i.e. to recreate merge conflicts that were accidentally resolved)\n",
                        "long": "--resolve-undo"
                    },
                    {
                        "name": "-z",
                        "content": "\\0 line termination on output and do not quote filenames. See OUTPUT below for more\ninformation.\n",
                        "flag": "-z"
                    },
                    {
                        "name": "--deduplicate",
                        "content": "When only filenames are shown, suppress duplicates that may come from having multiple\nstages during a merge, or giving --deleted and --modified option at the same time. When\nany of the -t, --unmerged, or --stage option is in use, this option has no effect.\n\n-x <pattern>, --exclude=<pattern>\nSkip untracked files matching pattern. Note that pattern is a shell wildcard pattern. See\nEXCLUDE PATTERNS below for more information.\n\n-X <file>, --exclude-from=<file>\nRead exclude patterns from <file>; 1 per line.\n\n--exclude-per-directory=<file>\nRead additional exclude patterns that apply only to the directory and its subdirectories\nin <file>. Deprecated; use --exclude-standard instead.\n",
                        "long": "--deduplicate"
                    },
                    {
                        "name": "--exclude-standard",
                        "content": "Add the standard Git exclusions: .git/info/exclude, .gitignore in each directory, and the\nuser’s global exclusion file.\n",
                        "long": "--exclude-standard"
                    },
                    {
                        "name": "--error-unmatch",
                        "content": "If any <file> does not appear in the index, treat this as an error (return 1).\n\n--with-tree=<tree-ish>\nWhen using --error-unmatch to expand the user supplied <file> (i.e. path pattern)\narguments to paths, pretend that paths which were removed in the index since the named\n<tree-ish> are still present. Using this option with -s or -u options does not make any\nsense.\n",
                        "long": "--error-unmatch"
                    },
                    {
                        "name": "-t",
                        "content": "Show status tags together with filenames. Note that for scripting purposes, git-status(1)\n--porcelain and git-diff-files(1) --name-status are almost always superior alternatives;\nusers should look at git-status(1) --short or git-diff(1) --name-status for more\nuser-friendly alternatives.\n\nThis option provides a reason for showing each filename, in the form of a status tag\n(which is followed by a space and then the filename). The status tags are all single\ncharacters from the following list:\n\nH\ntracked file that is not either unmerged or skip-worktree\n\nS\ntracked file that is skip-worktree\n\nM\ntracked file that is unmerged\n\nR\ntracked file with unstaged removal/deletion\n\nC\ntracked file with unstaged modification/change\n\nK\nuntracked paths which are part of file/directory conflicts which prevent checking out\ntracked files\n\n?\nuntracked file\n\nU\nfile with resolve-undo information\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-v",
                        "content": "Similar to -t, but use lowercase letters for files that are marked as assume unchanged\n(see git-update-index(1)).\n",
                        "flag": "-v"
                    },
                    {
                        "name": "-f",
                        "content": "Similar to -t, but use lowercase letters for files that are marked as fsmonitor valid\n(see git-update-index(1)).\n",
                        "flag": "-f"
                    },
                    {
                        "name": "--full-name",
                        "content": "When run from a subdirectory, the command usually outputs paths relative to the current\ndirectory. This option forces paths to be output relative to the project top directory.\n",
                        "long": "--full-name"
                    },
                    {
                        "name": "--recurse-submodules",
                        "content": "Recursively calls ls-files on each active submodule in the repository. Currently there is\nonly support for the --cached and --stage modes.\n\n--abbrev[=<n>]\nInstead of showing the full 40-byte hexadecimal object lines, show the shortest prefix\nthat is at least <n> hexdigits long that uniquely refers the object. Non default number\nof digits can be specified with --abbrev=<n>.\n",
                        "long": "--recurse-submodules"
                    },
                    {
                        "name": "--debug",
                        "content": "After each line that describes a file, add more data about its cache entry. This is\nintended to show as much information as possible for manual inspection; the exact format\nmay change at any time.\n",
                        "long": "--debug"
                    },
                    {
                        "name": "--eol",
                        "content": "Show <eolinfo> and <eolattr> of files. <eolinfo> is the file content identification used\nby Git when the \"text\" attribute is \"auto\" (or not set and core.autocrlf is not false).\n<eolinfo> is either \"-text\", \"none\", \"lf\", \"crlf\", \"mixed\" or \"\".\n\n\"\" means the file is not a regular file, it is not in the index or not accessible in the\nworking tree.\n\n<eolattr> is the attribute that is used when checking out or committing, it is either \"\",\n\"-text\", \"text\", \"text=auto\", \"text eol=lf\", \"text eol=crlf\". Since Git 2.10 \"text=auto\neol=lf\" and \"text=auto eol=crlf\" are supported.\n\nBoth the <eolinfo> in the index (\"i/<eolinfo>\") and in the working tree (\"w/<eolinfo>\")\nare shown for regular files, followed by the (\"attr/<eolattr>\").\n",
                        "long": "--eol"
                    },
                    {
                        "name": "--sparse",
                        "content": "If the index is sparse, show the sparse directories without expanding to the contained\nfiles. Sparse directories will be shown with a trailing slash, such as \"x/\" for a sparse\ndirectory \"x\".\n\n--format=<format>\nA string that interpolates %(fieldname) from the result being shown. It also interpolates\n%% to %, and %xx where xx are hex digits interpolates to character with hex code xx; for\nexample %00 interpolates to \\0 (NUL), %09 to \\t (TAB) and %0a to \\n (LF). --format cannot\nbe combined with -s, -o, -k, -t, --resolve-undo and --eol.\n\n--\nDo not interpret any more arguments as options.\n\n<file>\nFiles to show. If no files are given all files which match the other specified criteria\nare shown.\n",
                        "long": "--sparse"
                    }
                ]
            },
            "OUTPUT": {
                "content": "git ls-files just outputs the filenames unless --stage is specified in which case it outputs:\n\n[<tag> ]<mode> <object> <stage> <file>\n\ngit ls-files --eol will show\ni/<eolinfo><SPACES>w/<eolinfo><SPACES>attr/<eolattr><SPACE*><TAB><file>\n\ngit ls-files --unmerged and git ls-files --stage can be used to examine detailed information\non unmerged paths.\n\nFor an unmerged path, instead of recording a single mode/SHA-1 pair, the index records up to\nthree such pairs; one from tree O in stage 1, A in stage 2, and B in stage 3. This\ninformation can be used by the user (or the porcelain) to see what should eventually be\nrecorded at the path. (see git-read-tree(1) for more information on state)\n\nWithout the -z option, pathnames with \"unusual\" characters are quoted as explained for the\nconfiguration variable core.quotePath (see git-config(1)). Using -z the filename is output\nverbatim and the line is terminated by a NUL byte.\n\nIt is possible to print in a custom format by using the --format option, which is able to\ninterpolate different fields using a %(fieldname) notation. For example, if you only care\nabout the \"objectname\" and \"path\" fields, you can execute with a specific \"--format\" like\n\ngit ls-files --format='%(objectname) %(path)'\n",
                "subsections": []
            },
            "FIELD NAMES": {
                "content": "The way each path is shown can be customized by using the --format=<format> option, where the\n%(fieldname) in the <format> string for various aspects of the index entry are interpolated.\nThe following \"fieldname\" are understood:\n\nobjectmode\nThe mode of the file which is recorded in the index.\n\nobjecttype\nThe object type of the file which is recorded in the index.\n\nobjectname\nThe name of the file which is recorded in the index.\n\nobjectsize[:padded]\nThe object size of the file which is recorded in the index (\"-\" if the object is a commit\nor tree). It also supports a padded format of size with \"%(objectsize:padded)\".\n\nstage\nThe stage of the file which is recorded in the index.\n\neolinfo:index, eolinfo:worktree\nThe <eolinfo> (see the description of the --eol option) of the contents in the index or\nin the worktree for the path.\n\neolattr\nThe <eolattr> (see the description of the --eol option) that applies to the path.\n\npath\nThe pathname of the file which is recorded in the index.\n",
                "subsections": []
            },
            "EXCLUDE PATTERNS": {
                "content": "git ls-files can use a list of \"exclude patterns\" when traversing the directory tree and\nfinding files to show when the flags --others or --ignored are specified. gitignore(5)\nspecifies the format of exclude patterns.\n\nGenerally, you should just use --exclude-standard, but for historical reasons the exclude\npatterns can be specified from the following places, in order:\n\n1. The command-line flag --exclude=<pattern> specifies a single pattern. Patterns are\nordered in the same order they appear in the command line.\n\n2. The command-line flag --exclude-from=<file> specifies a file containing a list of\npatterns. Patterns are ordered in the same order they appear in the file.\n\n3. The command-line flag --exclude-per-directory=<name> specifies a name of the file in each\ndirectory git ls-files examines, normally .gitignore. Files in deeper directories take\nprecedence. Patterns are ordered in the same order they appear in the files.\n\nA pattern specified on the command line with --exclude or read from the file specified with\n--exclude-from is relative to the top of the directory tree. A pattern read from a file\nspecified by --exclude-per-directory is relative to the directory that the pattern file\nappears in.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "git-read-tree(1), gitignore(5)\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\nGit 2.43.0                                   07/02/2025                              GIT-LS-FILES(1)",
                "subsections": []
            }
        }
    }
}