{
    "content": [
        {
            "type": "text",
            "text": "# hgignore (man)\n\n## NAME\n\nhgignore - syntax for Mercurial ignore files\n\n## SYNOPSIS\n\nThe  Mercurial  system  uses a file called .hgignore in the root directory of a repository to\ncontrol its behavior when it searches for files that it is not currently tracking.\n\n## DESCRIPTION\n\nThe working directory of a Mercurial repository will often contain files that should  not  be\ntracked  by  Mercurial. These include backup files created by editors and build products cre‐\nated by compilers.  These files can be ignored by listing them in a  .hgignore  file  in  the\nroot  of  the working directory. The .hgignore file must be created manually. It is typically\nput under version control, so that the settings will propagate  to  other  repositories  with\npush and pull.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SYNTAX** (3 subsections)\n- **EXAMPLE**\n- **DEBUGGING**\n- **AUTHOR**\n- **SEE ALSO**\n- **COPYING**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "hgignore",
        "section": "",
        "mode": "man",
        "summary": "hgignore - syntax for Mercurial ignore files",
        "synopsis": "The  Mercurial  system  uses a file called .hgignore in the root directory of a repository to\ncontrol its behavior when it searches for files that it is not currently tracking.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Here is an example ignore file.",
            "# use glob syntax.",
            "syntax: glob",
            "*.elc",
            "*.pyc",
            "*~",
            "# switch to regexp syntax.",
            "syntax: regexp",
            "^\\.pc/"
        ],
        "see_also": [
            {
                "name": "hg",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/hg/1/json"
            },
            {
                "name": "hgrc",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/hgrc/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "SYNTAX",
                "lines": 13,
                "subsections": [
                    {
                        "name": "regexp",
                        "lines": 2
                    },
                    {
                        "name": "glob",
                        "lines": 2
                    },
                    {
                        "name": "rootglob",
                        "lines": 17
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DEBUGGING",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYING",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "hgignore - syntax for Mercurial ignore files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "The  Mercurial  system  uses a file called .hgignore in the root directory of a repository to\ncontrol its behavior when it searches for files that it is not currently tracking.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The working directory of a Mercurial repository will often contain files that should  not  be\ntracked  by  Mercurial. These include backup files created by editors and build products cre‐\nated by compilers.  These files can be ignored by listing them in a  .hgignore  file  in  the\nroot  of  the working directory. The .hgignore file must be created manually. It is typically\nput under version control, so that the settings will propagate  to  other  repositories  with\npush and pull.\n\nAn  untracked  file  is ignored if its path relative to the repository root directory, or any\nprefix path of that path, is matched against any pattern in .hgignore.\n\nFor example, say we have an untracked file, file.c, at a/b/file.c inside our repository. Mer‐\ncurial will ignore file.c if any pattern in .hgignore matches a/b/file.c, a/b or a.\n\nIn  addition, a Mercurial configuration file can reference a set of per-user or global ignore\nfiles. See the ignore configuration key on the [ui] section of hg help config for details  of\nhow to configure these files.\n\nTo control Mercurial's handling of files that it manages, many commands support the -I and -X\noptions; see hg help <command> and hg help patterns for details.\n\nFiles that are already tracked are not affected by .hgignore, even if they appear  in  .hgig‐\nnore.  An untracked file X can be explicitly added with hg add X, even if X would be excluded\nby a pattern in .hgignore.\n",
                "subsections": []
            },
            "SYNTAX": {
                "content": "An ignore file is a plain text file consisting of a list of patterns, with  one  pattern  per\nline.  Empty  lines are skipped. The # character is treated as a comment character, and the \\\ncharacter is treated as an escape character.\n\nMercurial supports several pattern syntaxes. The default  syntax  used  is  Python/Perl-style\nregular expressions.\n\nTo change the syntax used, use a line of the following form:\n\nsyntax: NAME\n\nwhere NAME is one of the following:\n",
                "subsections": [
                    {
                        "name": "regexp",
                        "content": "Regular expression, Python/Perl syntax.\n"
                    },
                    {
                        "name": "glob",
                        "content": "Shell-style glob.\n"
                    },
                    {
                        "name": "rootglob",
                        "content": "A variant of glob that is rooted (see below).\n\nThe chosen syntax stays in effect when parsing all patterns that follow, until another syntax\nis selected.\n\nNeither glob nor regexp patterns are rooted. A glob-syntax pattern of the form *.c will match\na file ending in .c in any directory, and a regexp pattern of the form \\.c$ will do the same.\nTo root a regexp pattern, start it with ^. To get the same effect with glob-syntax, you  have\nto use rootglob.\n\nSubdirectories  can  have  their  own  .hgignore  settings  by adding subinclude:path/to/sub‐‐\ndir/.hgignore to the root .hgignore. See hg help patterns for details on subinclude: and  in‐‐\nclude:.\n\nNote   Patterns specified in other than .hgignore are always rooted.  Please see hg help pat‐‐\nterns for details.\n"
                    }
                ]
            },
            "EXAMPLE": {
                "content": "Here is an example ignore file.\n\n# use glob syntax.\nsyntax: glob\n\n*.elc\n*.pyc\n*~\n\n# switch to regexp syntax.\nsyntax: regexp\n^\\.pc/\n",
                "subsections": []
            },
            "DEBUGGING": {
                "content": "Use the debugignore command to see if and why a file is ignored, or to see the  combined  ig‐\nnore pattern. See hg help debugignore for details.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Vadim Gelfer <vadim.gelfer@gmail.com>\n\nOrganization: Mercurial\n\n\n\n\nHGIGNORE(5)",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "hg(1), hgrc(5)\n",
                "subsections": []
            },
            "COPYING": {
                "content": "This  manual  page  is  copyright 2006 Vadim Gelfer.  Mercurial is copyright 2005-2022 Olivia\nMackall.  Free use of this software is granted under the terms of the GNU General Public  Li‐\ncense version 2 or any later version.\n",
                "subsections": []
            }
        }
    }
}