{
    "mode": "man",
    "parameter": "git",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/git/1/json",
    "generated": "2026-11-08T13:22:01Z",
    "synopsis": "git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n[-p|--paginate|-P|--no-pager] [--no-replace-objects] [--bare]\n[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n[--config-env=<name>=<envvar>] <command> [<args>]",
    "sections": {
        "NAME": {
            "content": "git - the stupid content tracker\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n[-p|--paginate|-P|--no-pager] [--no-replace-objects] [--bare]\n[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n[--config-env=<name>=<envvar>] <command> [<args>]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Git is a fast, scalable, distributed revision control system with an unusually rich command\nset that provides both high-level operations and full access to internals.\n\nSee gittutorial(7) to get started, then see giteveryday(7) for a useful minimum set of\ncommands. The Git User’s Manual[1] has a more in-depth introduction.\n\nAfter you mastered the basic concepts, you can come back to this page to learn what commands\nGit offers. You can learn more about individual Git commands with \"git help command\".\ngitcli(7) manual page gives you an overview of the command-line command syntax.\n\nA formatted and hyperlinked copy of the latest Git documentation can be viewed at\nhttps://git.github.io/htmldocs/git.html or https://git-scm.com/docs.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-v, --version",
                    "content": "Prints the Git suite version that the git program came from.\n\nThis option is internally converted to git version ...  and accepts the same options as\nthe git-version(1) command. If --help is also given, it takes precedence over --version.\n",
                    "flag": "-v",
                    "long": "--version"
                },
                {
                    "name": "-h, --help",
                    "content": "Prints the synopsis and a list of the most commonly used commands. If the option --all or\n-a is given then all available commands are printed. If a Git command is named this\noption will bring up the manual page for that command.\n\nOther options are available to control how the manual page is displayed. See git-help(1)\nfor more information, because git --help ...  is converted internally into git help ....\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-C <path>",
                    "content": "Run as if git was started in <path> instead of the current working directory. When\nmultiple -C options are given, each subsequent non-absolute -C <path> is interpreted\nrelative to the preceding -C <path>. If <path> is present but empty, e.g.  -C \"\", then\nthe current working directory is left unchanged.\n\nThis option affects options that expect path name like --git-dir and --work-tree in that\ntheir interpretations of the path names would be made relative to the working directory\ncaused by the -C option. For example the following invocations are equivalent:\n\ngit --git-dir=a.git --work-tree=b -C c status\ngit --git-dir=c/a.git --work-tree=c/b status\n\n-c <name>=<value>\nPass a configuration parameter to the command. The value given will override values from\nconfiguration files. The <name> is expected in the same format as listed by git config\n(subkeys separated by dots).\n\nNote that omitting the = in git -c foo.bar ...  is allowed and sets foo.bar to the\nboolean true value (just like [foo]bar would in a config file). Including the equals but\nwith an empty value (like git -c foo.bar= ...) sets foo.bar to the empty string which git\nconfig --type=bool will convert to false.\n\n--config-env=<name>=<envvar>\nLike -c <name>=<value>, give configuration variable <name> a value, where <envvar> is the\nname of an environment variable from which to retrieve the value. Unlike -c there is no\nshortcut for directly setting the value to an empty string, instead the environment\nvariable itself must be set to the empty string. It is an error if the <envvar> does not\nexist in the environment.  <envvar> may not contain an equals sign to avoid ambiguity\nwith <name> containing one.\n\nThis is useful for cases where you want to pass transitory configuration options to git,\nbut are doing so on operating systems where other processes might be able to read your\ncommand line (e.g.  /proc/self/cmdline), but not your environment (e.g.\n/proc/self/environ). That behavior is the default on Linux, but may not be on your\nsystem.\n\nNote that this might add security for variables such as http.extraHeader where the\nsensitive information is part of the value, but not e.g.  url.<base>.insteadOf where the\nsensitive information can be part of the key.\n\n--exec-path[=<path>]\nPath to wherever your core Git programs are installed. This can also be controlled by\nsetting the GITEXECPATH environment variable. If no path is given, git will print the\ncurrent setting and then exit.\n",
                    "flag": "-C",
                    "arg": "<path>"
                },
                {
                    "name": "--html-path",
                    "content": "Print the path, without trailing slash, where Git’s HTML documentation is installed and\nexit.\n",
                    "long": "--html-path"
                },
                {
                    "name": "--man-path",
                    "content": "Print the manpath (see man(1)) for the man pages for this version of Git and exit.\n",
                    "long": "--man-path"
                },
                {
                    "name": "--info-path",
                    "content": "Print the path where the Info files documenting this version of Git are installed and\nexit.\n",
                    "long": "--info-path"
                },
                {
                    "name": "-p, --paginate",
                    "content": "Pipe all output into less (or if set, $PAGER) if standard output is a terminal. This\noverrides the pager.<cmd> configuration options (see the \"Configuration Mechanism\"\nsection below).\n",
                    "flag": "-p",
                    "long": "--paginate"
                },
                {
                    "name": "-P, --no-pager",
                    "content": "Do not pipe Git output into a pager.\n\n--git-dir=<path>\nSet the path to the repository (\".git\" directory). This can also be controlled by setting\nthe GITDIR environment variable. It can be an absolute path or relative path to current\nworking directory.\n\nSpecifying the location of the \".git\" directory using this option (or GITDIR environment\nvariable) turns off the repository discovery that tries to find a directory with \".git\"\nsubdirectory (which is how the repository and the top-level of the working tree are\ndiscovered), and tells Git that you are at the top level of the working tree. If you are\nnot at the top-level directory of the working tree, you should tell Git where the\ntop-level of the working tree is, with the --work-tree=<path> option (or GITWORKTREE\nenvironment variable)\n\nIf you just want to run git as if it was started in <path> then use git -C <path>.\n\n--work-tree=<path>\nSet the path to the working tree. It can be an absolute path or a path relative to the\ncurrent working directory. This can also be controlled by setting the GITWORKTREE\nenvironment variable and the core.worktree configuration variable (see core.worktree in\ngit-config(1) for a more detailed discussion).\n\n--namespace=<path>\nSet the Git namespace. See gitnamespaces(7) for more details. Equivalent to setting the\nGITNAMESPACE environment variable.\n",
                    "flag": "-P",
                    "long": "--no-pager"
                },
                {
                    "name": "--bare",
                    "content": "Treat the repository as a bare repository. If GITDIR environment is not set, it is set\nto the current working directory.\n",
                    "long": "--bare"
                },
                {
                    "name": "--no-replace-objects",
                    "content": "Do not use replacement refs to replace Git objects. See git-replace(1) for more\ninformation.\n",
                    "long": "--no-replace-objects"
                },
                {
                    "name": "--literal-pathspecs",
                    "content": "Treat pathspecs literally (i.e. no globbing, no pathspec magic). This is equivalent to\nsetting the GITLITERALPATHSPECS environment variable to 1.\n",
                    "long": "--literal-pathspecs"
                },
                {
                    "name": "--glob-pathspecs",
                    "content": "Add \"glob\" magic to all pathspec. This is equivalent to setting the GITGLOBPATHSPECS\nenvironment variable to 1. Disabling globbing on individual pathspecs can be done using\npathspec magic \":(literal)\"\n",
                    "long": "--glob-pathspecs"
                },
                {
                    "name": "--noglob-pathspecs",
                    "content": "Add \"literal\" magic to all pathspec. This is equivalent to setting the\nGITNOGLOBPATHSPECS environment variable to 1. Enabling globbing on individual pathspecs\ncan be done using pathspec magic \":(glob)\"\n",
                    "long": "--noglob-pathspecs"
                },
                {
                    "name": "--icase-pathspecs",
                    "content": "Add \"icase\" magic to all pathspec. This is equivalent to setting the GITICASEPATHSPECS\nenvironment variable to 1.\n",
                    "long": "--icase-pathspecs"
                },
                {
                    "name": "--no-optional-locks",
                    "content": "Do not perform optional operations that require locks. This is equivalent to setting the\nGITOPTIONALLOCKS to 0.\n\n--list-cmds=group[,group...]\nList commands by group. This is an internal/experimental option and may change or be\nremoved in the future. Supported groups are: builtins, parseopt (builtin commands that\nuse parse-options), main (all commands in libexec directory), others (all other commands\nin $PATH that have git- prefix), list-<category> (see categories in command-list.txt),\nnohelpers (exclude helper commands), alias and config (retrieve command list from config\nvariable completion.commands)\n\n--attr-source=<tree-ish>\nRead gitattributes from <tree-ish> instead of the worktree. See gitattributes(5). This is\nequivalent to setting the GITATTRSOURCE environment variable.\n",
                    "long": "--no-optional-locks"
                }
            ]
        },
        "GIT COMMANDS": {
            "content": "We divide Git into high level (\"porcelain\") commands and low level (\"plumbing\") commands.\n\nHIGH-LEVEL COMMANDS (PORCELAIN)\nWe separate the porcelain commands into the main commands and some ancillary user utilities.\n",
            "subsections": [
                {
                    "name": "Main porcelain commands",
                    "content": "git-add(1)\nAdd file contents to the index.\n\ngit-am(1)\nApply a series of patches from a mailbox.\n\ngit-archive(1)\nCreate an archive of files from a named tree.\n\ngit-bisect(1)\nUse binary search to find the commit that introduced a bug.\n\ngit-branch(1)\nList, create, or delete branches.\n\ngit-bundle(1)\nMove objects and refs by archive.\n\ngit-checkout(1)\nSwitch branches or restore working tree files.\n\ngit-cherry-pick(1)\nApply the changes introduced by some existing commits.\n\ngit-citool(1)\nGraphical alternative to git-commit.\n\ngit-clean(1)\nRemove untracked files from the working tree.\n\ngit-clone(1)\nClone a repository into a new directory.\n\ngit-commit(1)\nRecord changes to the repository.\n\ngit-describe(1)\nGive an object a human readable name based on an available ref.\n\ngit-diff(1)\nShow changes between commits, commit and working tree, etc.\n\ngit-fetch(1)\nDownload objects and refs from another repository.\n\ngit-format-patch(1)\nPrepare patches for e-mail submission.\n\ngit-gc(1)\nCleanup unnecessary files and optimize the local repository.\n\ngit-grep(1)\nPrint lines matching a pattern.\n\ngit-gui(1)\nA portable graphical interface to Git.\n\ngit-init(1)\nCreate an empty Git repository or reinitialize an existing one.\n\ngit-log(1)\nShow commit logs.\n\ngit-maintenance(1)\nRun tasks to optimize Git repository data.\n\ngit-merge(1)\nJoin two or more development histories together.\n\ngit-mv(1)\nMove or rename a file, a directory, or a symlink.\n\ngit-notes(1)\nAdd or inspect object notes.\n\ngit-pull(1)\nFetch from and integrate with another repository or a local branch.\n\ngit-push(1)\nUpdate remote refs along with associated objects.\n\ngit-range-diff(1)\nCompare two commit ranges (e.g. two versions of a branch).\n\ngit-rebase(1)\nReapply commits on top of another base tip.\n\ngit-reset(1)\nReset current HEAD to the specified state.\n\ngit-restore(1)\nRestore working tree files.\n\ngit-revert(1)\nRevert some existing commits.\n\ngit-rm(1)\nRemove files from the working tree and from the index.\n\ngit-shortlog(1)\nSummarize git log output.\n\ngit-show(1)\nShow various types of objects.\n\ngit-sparse-checkout(1)\nReduce your working tree to a subset of tracked files.\n\ngit-stash(1)\nStash the changes in a dirty working directory away.\n\ngit-status(1)\nShow the working tree status.\n\ngit-submodule(1)\nInitialize, update or inspect submodules.\n\ngit-switch(1)\nSwitch branches.\n\ngit-tag(1)\nCreate, list, delete or verify a tag object signed with GPG.\n\ngit-worktree(1)\nManage multiple working trees.\n\ngitk(1)\nThe Git repository browser.\n\nscalar(1)\nA tool for managing large Git repositories.\n"
                },
                {
                    "name": "Ancillary Commands",
                    "content": "Manipulators:\n\ngit-config(1)\nGet and set repository or global options.\n\ngit-fast-export(1)\nGit data exporter.\n\ngit-fast-import(1)\nBackend for fast Git data importers.\n\ngit-filter-branch(1)\nRewrite branches.\n\ngit-mergetool(1)\nRun merge conflict resolution tools to resolve merge conflicts.\n\ngit-pack-refs(1)\nPack heads and tags for efficient repository access.\n\ngit-prune(1)\nPrune all unreachable objects from the object database.\n\ngit-reflog(1)\nManage reflog information.\n\ngit-remote(1)\nManage set of tracked repositories.\n\ngit-repack(1)\nPack unpacked objects in a repository.\n\ngit-replace(1)\nCreate, list, delete refs to replace objects.\n\nInterrogators:\n\ngit-annotate(1)\nAnnotate file lines with commit information.\n\ngit-blame(1)\nShow what revision and author last modified each line of a file.\n\ngit-bugreport(1)\nCollect information for user to file a bug report.\n\ngit-count-objects(1)\nCount unpacked number of objects and their disk consumption.\n\ngit-diagnose(1)\nGenerate a zip archive of diagnostic information.\n\ngit-difftool(1)\nShow changes using common diff tools.\n\ngit-fsck(1)\nVerifies the connectivity and validity of the objects in the database.\n\ngit-help(1)\nDisplay help information about Git.\n\ngit-instaweb(1)\nInstantly browse your working repository in gitweb.\n\ngit-merge-tree(1)\nPerform merge without touching index or working tree.\n\ngit-rerere(1)\nReuse recorded resolution of conflicted merges.\n\ngit-show-branch(1)\nShow branches and their commits.\n\ngit-verify-commit(1)\nCheck the GPG signature of commits.\n\ngit-verify-tag(1)\nCheck the GPG signature of tags.\n\ngit-version(1)\nDisplay version information about Git.\n\ngit-whatchanged(1)\nShow logs with differences each commit introduces.\n\ngitweb(1)\nGit web interface (web frontend to Git repositories).\n"
                },
                {
                    "name": "Interacting with Others",
                    "content": "These commands are to interact with foreign SCM and with other people via patch over e-mail.\n\ngit-archimport(1)\nImport a GNU Arch repository into Git.\n\ngit-cvsexportcommit(1)\nExport a single commit to a CVS checkout.\n\ngit-cvsimport(1)\nSalvage your data out of another SCM people love to hate.\n\ngit-cvsserver(1)\nA CVS server emulator for Git.\n\ngit-imap-send(1)\nSend a collection of patches from stdin to an IMAP folder.\n\ngit-p4(1)\nImport from and submit to Perforce repositories.\n\ngit-quiltimport(1)\nApplies a quilt patchset onto the current branch.\n\ngit-request-pull(1)\nGenerates a summary of pending changes.\n\ngit-send-email(1)\nSend a collection of patches as emails.\n\ngit-svn(1)\nBidirectional operation between a Subversion repository and Git.\n"
                },
                {
                    "name": "Reset, restore and revert",
                    "content": "There are three commands with similar names: git reset, git restore and git revert.\n\n•   git-revert(1) is about making a new commit that reverts the changes made by other\ncommits.\n\n•   git-restore(1) is about restoring files in the working tree from either the index or\nanother commit. This command does not update your branch. The command can also be used to\nrestore files in the index from another commit.\n\n•   git-reset(1) is about updating your branch, moving the tip in order to add or remove\ncommits from the branch. This operation changes the commit history.\n\ngit reset can also be used to restore the index, overlapping with git restore.\n\nLOW-LEVEL COMMANDS (PLUMBING)\nAlthough Git includes its own porcelain layer, its low-level commands are sufficient to\nsupport development of alternative porcelains. Developers of such porcelains might start by\nreading about git-update-index(1) and git-read-tree(1).\n\nThe interface (input, output, set of options and the semantics) to these low-level commands\nare meant to be a lot more stable than Porcelain level commands, because these commands are\nprimarily for scripted use. The interface to Porcelain commands on the other hand are subject\nto change in order to improve the end user experience.\n\nThe following description divides the low-level commands into commands that manipulate\nobjects (in the repository, index, and working tree), commands that interrogate and compare\nobjects, and commands that move objects and references between repositories.\n"
                },
                {
                    "name": "Manipulation commands",
                    "content": "git-apply(1)\nApply a patch to files and/or to the index.\n\ngit-checkout-index(1)\nCopy files from the index to the working tree.\n\ngit-commit-graph(1)\nWrite and verify Git commit-graph files.\n\ngit-commit-tree(1)\nCreate a new commit object.\n\ngit-hash-object(1)\nCompute object ID and optionally create an object from a file.\n\ngit-index-pack(1)\nBuild pack index file for an existing packed archive.\n\ngit-merge-file(1)\nRun a three-way file merge.\n\ngit-merge-index(1)\nRun a merge for files needing merging.\n\ngit-mktag(1)\nCreates a tag object with extra validation.\n\ngit-mktree(1)\nBuild a tree-object from ls-tree formatted text.\n\ngit-multi-pack-index(1)\nWrite and verify multi-pack-indexes.\n\ngit-pack-objects(1)\nCreate a packed archive of objects.\n\ngit-prune-packed(1)\nRemove extra objects that are already in pack files.\n\ngit-read-tree(1)\nReads tree information into the index.\n\ngit-symbolic-ref(1)\nRead, modify and delete symbolic refs.\n\ngit-unpack-objects(1)\nUnpack objects from a packed archive.\n\ngit-update-index(1)\nRegister file contents in the working tree to the index.\n\ngit-update-ref(1)\nUpdate the object name stored in a ref safely.\n\ngit-write-tree(1)\nCreate a tree object from the current index.\n"
                },
                {
                    "name": "Interrogation commands",
                    "content": "git-cat-file(1)\nProvide contents or details of repository objects.\n\ngit-cherry(1)\nFind commits yet to be applied to upstream.\n\ngit-diff-files(1)\nCompares files in the working tree and the index.\n\ngit-diff-index(1)\nCompare a tree to the working tree or index.\n\ngit-diff-tree(1)\nCompares the content and mode of blobs found via two tree objects.\n\ngit-for-each-ref(1)\nOutput information on each ref.\n\ngit-for-each-repo(1)\nRun a Git command on a list of repositories.\n\ngit-get-tar-commit-id(1)\nExtract commit ID from an archive created using git-archive.\n\ngit-ls-files(1)\nShow information about files in the index and the working tree.\n\ngit-ls-remote(1)\nList references in a remote repository.\n\ngit-ls-tree(1)\nList the contents of a tree object.\n\ngit-merge-base(1)\nFind as good common ancestors as possible for a merge.\n\ngit-name-rev(1)\nFind symbolic names for given revs.\n\ngit-pack-redundant(1)\nFind redundant pack files.\n\ngit-rev-list(1)\nLists commit objects in reverse chronological order.\n\ngit-rev-parse(1)\nPick out and massage parameters.\n\ngit-show-index(1)\nShow packed archive index.\n\ngit-show-ref(1)\nList references in a local repository.\n\ngit-unpack-file(1)\nCreates a temporary file with a blob’s contents.\n\ngit-var(1)\nShow a Git logical variable.\n\ngit-verify-pack(1)\nValidate packed Git archive files.\n\nIn general, the interrogate commands do not touch the files in the working tree.\n"
                },
                {
                    "name": "Syncing repositories",
                    "content": "git-daemon(1)\nA really simple server for Git repositories.\n\ngit-fetch-pack(1)\nReceive missing objects from another repository.\n\ngit-http-backend(1)\nServer side implementation of Git over HTTP.\n\ngit-send-pack(1)\nPush objects over Git protocol to another repository.\n\ngit-update-server-info(1)\nUpdate auxiliary info file to help dumb servers.\n\nThe following are helper commands used by the above; end users typically do not use them\ndirectly.\n\ngit-http-fetch(1)\nDownload from a remote Git repository via HTTP.\n\ngit-http-push(1)\nPush objects over HTTP/DAV to another repository.\n\ngit-receive-pack(1)\nReceive what is pushed into the repository.\n\ngit-shell(1)\nRestricted login shell for Git-only SSH access.\n\ngit-upload-archive(1)\nSend archive back to git-archive.\n\ngit-upload-pack(1)\nSend objects packed back to git-fetch-pack.\n"
                },
                {
                    "name": "Internal helper commands",
                    "content": "These are internal helper commands used by other commands; end users typically do not use\nthem directly.\n\ngit-check-attr(1)\nDisplay gitattributes information.\n\ngit-check-ignore(1)\nDebug gitignore / exclude files.\n\ngit-check-mailmap(1)\nShow canonical names and email addresses of contacts.\n\ngit-check-ref-format(1)\nEnsures that a reference name is well formed.\n\ngit-column(1)\nDisplay data in columns.\n\ngit-credential(1)\nRetrieve and store user credentials.\n\ngit-credential-cache(1)\nHelper to temporarily store passwords in memory.\n\ngit-credential-store(1)\nHelper to store credentials on disk.\n\ngit-fmt-merge-msg(1)\nProduce a merge commit message.\n\ngit-hook(1)\nRun git hooks.\n\ngit-interpret-trailers(1)\nAdd or parse structured information in commit messages.\n\ngit-mailinfo(1)\nExtracts patch and authorship from a single e-mail message.\n\ngit-mailsplit(1)\nSimple UNIX mbox splitter program.\n\ngit-merge-one-file(1)\nThe standard helper program to use with git-merge-index.\n\ngit-patch-id(1)\nCompute unique ID for a patch.\n\ngit-sh-i18n(1)\nGit’s i18n setup code for shell scripts.\n\ngit-sh-setup(1)\nCommon Git shell script setup code.\n\ngit-stripspace(1)\nRemove unnecessary whitespace.\n"
                }
            ]
        },
        "GUIDES": {
            "content": "The following documentation pages are guides about Git concepts.\n\ngitcore-tutorial(7)\nA Git core tutorial for developers.\n\ngitcredentials(7)\nProviding usernames and passwords to Git.\n\ngitcvs-migration(7)\nGit for CVS users.\n\ngitdiffcore(7)\nTweaking diff output.\n\ngiteveryday(7)\nA useful minimum set of commands for Everyday Git.\n\ngitfaq(7)\nFrequently asked questions about using Git.\n\ngitglossary(7)\nA Git Glossary.\n\ngitnamespaces(7)\nGit namespaces.\n\ngitremote-helpers(7)\nHelper programs to interact with remote repositories.\n\ngitsubmodules(7)\nMounting one repository inside another.\n\ngittutorial(7)\nA tutorial introduction to Git.\n\ngittutorial-2(7)\nA tutorial introduction to Git: part two.\n\ngitworkflows(7)\nAn overview of recommended workflows with Git.\n\nREPOSITORY, COMMAND AND FILE INTERFACES\nThis documentation discusses repository and command interfaces which users are expected to\ninteract with directly. See --user-formats in git-help(1) for more details on the criteria.\n\ngitattributes(5)\nDefining attributes per path.\n\ngitcli(7)\nGit command-line interface and conventions.\n\ngithooks(5)\nHooks used by Git.\n\ngitignore(5)\nSpecifies intentionally untracked files to ignore.\n\ngitmailmap(5)\nMap author/committer names and/or E-Mail addresses.\n\ngitmodules(5)\nDefining submodule properties.\n\ngitrepository-layout(5)\nGit Repository Layout.\n\ngitrevisions(7)\nSpecifying revisions and ranges for Git.\n\nFILE FORMATS, PROTOCOLS AND OTHER DEVELOPER INTERFACES\nThis documentation discusses file formats, over-the-wire protocols and other git developer\ninterfaces. See --developer-interfaces in git-help(1).\n\ngitformat-bundle(5)\nThe bundle file format.\n\ngitformat-chunk(5)\nChunk-based file formats.\n\ngitformat-commit-graph(5)\nGit commit-graph format.\n\ngitformat-index(5)\nGit index format.\n\ngitformat-pack(5)\nGit pack format.\n\ngitformat-signature(5)\nGit cryptographic signature formats.\n\ngitprotocol-capabilities(5)\nProtocol v0 and v1 capabilities.\n\ngitprotocol-common(5)\nThings common to various protocols.\n\ngitprotocol-http(5)\nGit HTTP-based protocols.\n\ngitprotocol-pack(5)\nHow packs are transferred over-the-wire.\n\ngitprotocol-v2(5)\nGit Wire Protocol, Version 2.\n",
            "subsections": []
        },
        "CONFIGURATION MECHANISM": {
            "content": "Git uses a simple text format to store customizations that are per repository and are per\nuser. Such a configuration file may look like this:\n\n#\n# A '#' or ';' character indicates a comment.\n#\n\n; core variables\n[core]\n; Don't trust file modes\nfilemode = false\n\n; user identity\n[user]\nname = \"Junio C Hamano\"\nemail = \"gitster@pobox.com\"\n\n\nVarious commands read from the configuration file and adjust their operation accordingly. See\ngit-config(1) for a list and more details about the configuration mechanism.\n",
            "subsections": []
        },
        "IDENTIFIER TERMINOLOGY": {
            "content": "<object>\nIndicates the object name for any type of object.\n\n<blob>\nIndicates a blob object name.\n\n<tree>\nIndicates a tree object name.\n\n<commit>\nIndicates a commit object name.\n\n<tree-ish>\nIndicates a tree, commit or tag object name. A command that takes a <tree-ish> argument\nultimately wants to operate on a <tree> object but automatically dereferences <commit>\nand <tag> objects that point at a <tree>.\n\n<commit-ish>\nIndicates a commit or tag object name. A command that takes a <commit-ish> argument\nultimately wants to operate on a <commit> object but automatically dereferences <tag>\nobjects that point at a <commit>.\n\n<type>\nIndicates that an object type is required. Currently one of: blob, tree, commit, or tag.\n\n<file>\nIndicates a filename - almost always relative to the root of the tree structure\nGITINDEXFILE describes.\n",
            "subsections": []
        },
        "SYMBOLIC IDENTIFIERS": {
            "content": "Any Git command accepting any <object> can also use the following symbolic notation:\n\nHEAD\nindicates the head of the current branch.\n\n<tag>\na valid tag name (i.e. a refs/tags/<tag> reference).\n\n<head>\na valid head name (i.e. a refs/heads/<head> reference).\n\nFor a more complete list of ways to spell object names, see \"SPECIFYING REVISIONS\" section in\ngitrevisions(7).\n",
            "subsections": []
        },
        "FILE/DIRECTORY STRUCTURE": {
            "content": "Please see the gitrepository-layout(5) document.\n\nRead githooks(5) for more details about each hook.\n\nHigher level SCMs may provide and manage additional information in the $GITDIR.\n",
            "subsections": []
        },
        "TERMINOLOGY": {
            "content": "Please see gitglossary(7).\n",
            "subsections": []
        },
        "ENVIRONMENT VARIABLES": {
            "content": "Various Git commands pay attention to environment variables and change their behavior. The\nenvironment variables marked as \"Boolean\" take their values the same way as Boolean valued\nconfiguration variables, e.g. \"true\", \"yes\", \"on\" and positive numbers are taken as \"yes\".\n\nHere are the variables:\n",
            "subsections": [
                {
                    "name": "The Git Repository",
                    "content": "These environment variables apply to all core Git commands. Nb: it is worth noting that they\nmay be used/overridden by SCMS sitting above Git so take care if using a foreign front-end.\n\nGITINDEXFILE\nThis environment variable specifies an alternate index file. If not specified, the\ndefault of $GITDIR/index is used.\n\nGITINDEXVERSION\nThis environment variable specifies what index version is used when writing the index\nfile out. It won’t affect existing index files. By default index file version 2 or 3 is\nused. See git-update-index(1) for more information.\n\nGITOBJECTDIRECTORY\nIf the object storage directory is specified via this environment variable then the sha1\ndirectories are created underneath - otherwise the default $GITDIR/objects directory is\nused.\n\nGITALTERNATEOBJECTDIRECTORIES\nDue to the immutable nature of Git objects, old objects can be archived into shared,\nread-only directories. This variable specifies a \":\" separated (on Windows \";\" separated)\nlist of Git object directories which can be used to search for Git objects. New objects\nwill not be written to these directories.\n\nEntries that begin with \" (double-quote) will be interpreted as C-style quoted paths,\nremoving leading and trailing double-quotes and respecting backslash escapes. E.g., the\nvalue \"path-with-\\\"-and-:-in-it\":vanilla-path has two paths: path-with-\"-and-:-in-it and\nvanilla-path.\n\nGITDIR\nIf the GITDIR environment variable is set then it specifies a path to use instead of the\ndefault .git for the base of the repository. The --git-dir command-line option also sets\nthis value.\n\nGITWORKTREE\nSet the path to the root of the working tree. This can also be controlled by the\n--work-tree command-line option and the core.worktree configuration variable.\n\nGITNAMESPACE\nSet the Git namespace; see gitnamespaces(7) for details. The --namespace command-line\noption also sets this value.\n\nGITCEILINGDIRECTORIES\nThis should be a colon-separated list of absolute paths. If set, it is a list of\ndirectories that Git should not chdir up into while looking for a repository directory\n(useful for excluding slow-loading network directories). It will not exclude the current\nworking directory or a GITDIR set on the command line or in the environment. Normally,\nGit has to read the entries in this list and resolve any symlink that might be present in\norder to compare them with the current directory. However, if even this access is slow,\nyou can add an empty entry to the list to tell Git that the subsequent entries are not\nsymlinks and needn’t be resolved; e.g.,\nGITCEILINGDIRECTORIES=/maybe/symlink::/very/slow/non/symlink.\n\nGITDISCOVERYACROSSFILESYSTEM\nWhen run in a directory that does not have \".git\" repository directory, Git tries to find\nsuch a directory in the parent directories to find the top of the working tree, but by\ndefault it does not cross filesystem boundaries. This Boolean environment variable can be\nset to true to tell Git not to stop at filesystem boundaries. Like\nGITCEILINGDIRECTORIES, this will not affect an explicit repository directory set via\nGITDIR or on the command line.\n\nGITCOMMONDIR\nIf this variable is set to a path, non-worktree files that are normally in $GITDIR will\nbe taken from this path instead. Worktree-specific files such as HEAD or index are taken\nfrom $GITDIR. See gitrepository-layout(5) and git-worktree(1) for details. This variable\nhas lower precedence than other path variables such as GITINDEXFILE,\nGITOBJECTDIRECTORY...\n\nGITDEFAULTHASH\nIf this variable is set, the default hash algorithm for new repositories will be set to\nthis value. This value is ignored when cloning and the setting of the remote repository\nis always used. The default is \"sha1\". See --object-format in git-init(1).\n"
                },
                {
                    "name": "Git Commits",
                    "content": "GITAUTHORNAME\nThe human-readable name used in the author identity when creating commit or tag objects,\nor when writing reflogs. Overrides the user.name and author.name configuration settings.\n\nGITAUTHOREMAIL\nThe email address used in the author identity when creating commit or tag objects, or\nwhen writing reflogs. Overrides the user.email and author.email configuration settings.\n\nGITAUTHORDATE\nThe date used for the author identity when creating commit or tag objects, or when\nwriting reflogs. See git-commit(1) for valid formats.\n\nGITCOMMITTERNAME\nThe human-readable name used in the committer identity when creating commit or tag\nobjects, or when writing reflogs. Overrides the user.name and committer.name\nconfiguration settings.\n\nGITCOMMITTEREMAIL\nThe email address used in the author identity when creating commit or tag objects, or\nwhen writing reflogs. Overrides the user.email and committer.email configuration\nsettings.\n\nGITCOMMITTERDATE\nThe date used for the committer identity when creating commit or tag objects, or when\nwriting reflogs. See git-commit(1) for valid formats.\n\nEMAIL\nThe email address used in the author and committer identities if no other relevant\nenvironment variable or configuration setting has been set.\n"
                },
                {
                    "name": "Git Diffs",
                    "content": "GITDIFFOPTS\nOnly valid setting is \"--unified=??\" or \"-u??\" to set the number of context lines shown\nwhen a unified diff is created. This takes precedence over any \"-U\" or \"--unified\" option\nvalue passed on the Git diff command line.\n\nGITEXTERNALDIFF\nWhen the environment variable GITEXTERNALDIFF is set, the program named by it is called\nto generate diffs, and Git does not use its builtin diff machinery. For a path that is\nadded, removed, or modified, GITEXTERNALDIFF is called with 7 parameters:\n\npath old-file old-hex old-mode new-file new-hex new-mode\n\nwhere:\n\n<old|new>-file\nare files GITEXTERNALDIFF can use to read the contents of <old|new>,\n\n<old|new>-hex\nare the 40-hexdigit SHA-1 hashes,\n\n<old|new>-mode\nare the octal representation of the file modes.\n\nThe file parameters can point at the user’s working file (e.g.  new-file in\n\"git-diff-files\"), /dev/null (e.g.  old-file when a new file is added), or a temporary\nfile (e.g.  old-file in the index).  GITEXTERNALDIFF should not worry about unlinking\nthe temporary file — it is removed when GITEXTERNALDIFF exits.\n\nFor a path that is unmerged, GITEXTERNALDIFF is called with 1 parameter, <path>.\n\nFor each path GITEXTERNALDIFF is called, two environment variables,\nGITDIFFPATHCOUNTER and GITDIFFPATHTOTAL are set.\n\nGITDIFFPATHCOUNTER\nA 1-based counter incremented by one for every path.\n\nGITDIFFPATHTOTAL\nThe total number of paths.\n"
                },
                {
                    "name": "other",
                    "content": "GITMERGEVERBOSITY\nA number controlling the amount of output shown by the recursive merge strategy.\nOverrides merge.verbosity. See git-merge(1)\n\nGITPAGER\nThis environment variable overrides $PAGER. If it is set to an empty string or to the\nvalue \"cat\", Git will not launch a pager. See also the core.pager option in git-\nconfig(1).\n\nGITPROGRESSDELAY\nA number controlling how many seconds to delay before showing optional progress\nindicators. Defaults to 2.\n\nGITEDITOR\nThis environment variable overrides $EDITOR and $VISUAL. It is used by several Git\ncommands when, on interactive mode, an editor is to be launched. See also git-var(1) and\nthe core.editor option in git-config(1).\n\nGITSEQUENCEEDITOR\nThis environment variable overrides the configured Git editor when editing the todo list\nof an interactive rebase. See also git-rebase(1) and the sequence.editor option in git-\nconfig(1).\n\nGITSSH, GITSSHCOMMAND\nIf either of these environment variables is set then git fetch and git push will use the\nspecified command instead of ssh when they need to connect to a remote system. The\ncommand-line parameters passed to the configured command are determined by the ssh\nvariant. See ssh.variant option in git-config(1) for details.\n\n$GITSSHCOMMAND takes precedence over $GITSSH, and is interpreted by the shell, which\nallows additional arguments to be included.  $GITSSH on the other hand must be just the\npath to a program (which can be a wrapper shell script, if additional arguments are\nneeded).\n\nUsually it is easier to configure any desired options through your personal .ssh/config\nfile. Please consult your ssh documentation for further details.\n\nGITSSHVARIANT\nIf this environment variable is set, it overrides Git’s autodetection whether\nGITSSH/GITSSHCOMMAND/core.sshCommand refer to OpenSSH, plink or tortoiseplink. This\nvariable overrides the config setting ssh.variant that serves the same purpose.\n\nGITSSLNOVERIFY\nSetting and exporting this environment variable to any value tells Git not to verify the\nSSL certificate when fetching or pushing over HTTPS.\n\nGITATTRSOURCE\nSets the treeish that gitattributes will be read from.\n\nGITASKPASS\nIf this environment variable is set, then Git commands which need to acquire passwords or\npassphrases (e.g. for HTTP or IMAP authentication) will call this program with a suitable\nprompt as command-line argument and read the password from its STDOUT. See also the\ncore.askPass option in git-config(1).\n\nGITTERMINALPROMPT\nIf this Boolean environment variable is set to false, git will not prompt on the terminal\n(e.g., when asking for HTTP authentication).\n\nGITCONFIGGLOBAL, GITCONFIGSYSTEM\nTake the configuration from the given files instead from global or system-level\nconfiguration files. If GITCONFIGSYSTEM is set, the system config file defined at build\ntime (usually /etc/gitconfig) will not be read. Likewise, if GITCONFIGGLOBAL is set,\nneither $HOME/.gitconfig nor $XDGCONFIGHOME/git/config will be read. Can be set to\n/dev/null to skip reading configuration files of the respective level.\n\nGITCONFIGNOSYSTEM\nWhether to skip reading settings from the system-wide $(prefix)/etc/gitconfig file. This\nBoolean environment variable can be used along with $HOME and $XDGCONFIGHOME to create\na predictable environment for a picky script, or you can set it to true to temporarily\navoid using a buggy /etc/gitconfig file while waiting for someone with sufficient\npermissions to fix it.\n\nGITFLUSH\nIf this environment variable is set to \"1\", then commands such as git blame (in\nincremental mode), git rev-list, git log, git check-attr and git check-ignore will force\na flush of the output stream after each record have been flushed. If this variable is set\nto \"0\", the output of these commands will be done using completely buffered I/O. If this\nenvironment variable is not set, Git will choose buffered or record-oriented flushing\nbased on whether stdout appears to be redirected to a file or not.\n\nGITTRACE\nEnables general trace messages, e.g. alias expansion, built-in command execution and\nexternal command execution.\n\nIf this variable is set to \"1\", \"2\" or \"true\" (comparison is case insensitive), trace\nmessages will be printed to stderr.\n\nIf the variable is set to an integer value greater than 2 and lower than 10 (strictly)\nthen Git will interpret this value as an open file descriptor and will try to write the\ntrace messages into this file descriptor.\n\nAlternatively, if the variable is set to an absolute path (starting with a / character),\nGit will interpret this as a file path and will try to append the trace messages to it.\n\nUnsetting the variable, or setting it to empty, \"0\" or \"false\" (case insensitive)\ndisables trace messages.\n\nGITTRACEFSMONITOR\nEnables trace messages for the filesystem monitor extension. See GITTRACE for available\ntrace output options.\n\nGITTRACEPACKACCESS\nEnables trace messages for all accesses to any packs. For each access, the pack file name\nand an offset in the pack is recorded. This may be helpful for troubleshooting some\npack-related performance problems. See GITTRACE for available trace output options.\n\nGITTRACEPACKET\nEnables trace messages for all packets coming in or out of a given program. This can help\nwith debugging object negotiation or other protocol issues. Tracing is turned off at a\npacket starting with \"PACK\" (but see GITTRACEPACKFILE below). See GITTRACE for\navailable trace output options.\n\nGITTRACEPACKFILE\nEnables tracing of packfiles sent or received by a given program. Unlike other trace\noutput, this trace is verbatim: no headers, and no quoting of binary data. You almost\ncertainly want to direct into a file (e.g., GITTRACEPACKFILE=/tmp/my.pack) rather than\ndisplaying it on the terminal or mixing it with other trace output.\n\nNote that this is currently only implemented for the client side of clones and fetches.\n\nGITTRACEPERFORMANCE\nEnables performance related trace messages, e.g. total execution time of each Git\ncommand. See GITTRACE for available trace output options.\n\nGITTRACEREFS\nEnables trace messages for operations on the ref database. See GITTRACE for available\ntrace output options.\n\nGITTRACESETUP\nEnables trace messages printing the .git, working tree and current working directory\nafter Git has completed its setup phase. See GITTRACE for available trace output\noptions.\n\nGITTRACESHALLOW\nEnables trace messages that can help debugging fetching / cloning of shallow\nrepositories. See GITTRACE for available trace output options.\n\nGITTRACECURL\nEnables a curl full trace dump of all incoming and outgoing data, including descriptive\ninformation, of the git transport protocol. This is similar to doing curl --trace-ascii\non the command line. See GITTRACE for available trace output options.\n\nGITTRACECURLNODATA\nWhen a curl trace is enabled (see GITTRACECURL above), do not dump data (that is, only\ndump info lines and headers).\n\nGITTRACE2\nEnables more detailed trace messages from the \"trace2\" library. Output from GITTRACE2 is\na simple text-based format for human readability.\n\nIf this variable is set to \"1\", \"2\" or \"true\" (comparison is case insensitive), trace\nmessages will be printed to stderr.\n\nIf the variable is set to an integer value greater than 2 and lower than 10 (strictly)\nthen Git will interpret this value as an open file descriptor and will try to write the\ntrace messages into this file descriptor.\n\nAlternatively, if the variable is set to an absolute path (starting with a / character),\nGit will interpret this as a file path and will try to append the trace messages to it.\nIf the path already exists and is a directory, the trace messages will be written to\nfiles (one per process) in that directory, named according to the last component of the\nSID and an optional counter (to avoid filename collisions).\n\nIn addition, if the variable is set to afunix:[<sockettype>:]<absolute-pathname>, Git\nwill try to open the path as a Unix Domain Socket. The socket type can be either stream\nor dgram.\n\nUnsetting the variable, or setting it to empty, \"0\" or \"false\" (case insensitive)\ndisables trace messages.\n\nSee Trace2 documentation[2] for full details.\n\nGITTRACE2EVENT\nThis setting writes a JSON-based format that is suited for machine interpretation. See\nGITTRACE2 for available trace output options and Trace2 documentation[2] for full\ndetails.\n\nGITTRACE2PERF\nIn addition to the text-based messages available in GITTRACE2, this setting writes a\ncolumn-based format for understanding nesting regions. See GITTRACE2 for available trace\noutput options and Trace2 documentation[2] for full details.\n\nGITTRACEREDACT\nBy default, when tracing is activated, Git redacts the values of cookies, the\n\"Authorization:\" header, the \"Proxy-Authorization:\" header and packfile URIs. Set this\nBoolean environment variable to false to prevent this redaction.\n\nGITLITERALPATHSPECS\nSetting this Boolean environment variable to true will cause Git to treat all pathspecs\nliterally, rather than as glob patterns. For example, running GITLITERALPATHSPECS=1 git\nlog -- '*.c' will search for commits that touch the path *.c, not any paths that the glob\n*.c matches. You might want this if you are feeding literal paths to Git (e.g., paths\npreviously given to you by git ls-tree, --raw diff output, etc).\n\nGITGLOBPATHSPECS\nSetting this Boolean environment variable to true will cause Git to treat all pathspecs\nas glob patterns (aka \"glob\" magic).\n\nGITNOGLOBPATHSPECS\nSetting this Boolean environment variable to true will cause Git to treat all pathspecs\nas literal (aka \"literal\" magic).\n\nGITICASEPATHSPECS\nSetting this Boolean environment variable to true will cause Git to treat all pathspecs\nas case-insensitive.\n\nGITREFLOGACTION\nWhen a ref is updated, reflog entries are created to keep track of the reason why the ref\nwas updated (which is typically the name of the high-level command that updated the ref),\nin addition to the old and new values of the ref. A scripted Porcelain command can use\nsetreflogaction helper function in git-sh-setup to set its name to this variable when\nit is invoked as the top level command by the end user, to be recorded in the body of the\nreflog.\n\nGITREFPARANOIA\nIf this Boolean environment variable is set to false, ignore broken or badly named refs\nwhen iterating over lists of refs. Normally Git will try to include any such refs, which\nmay cause some operations to fail. This is usually preferable, as potentially destructive\noperations (e.g., git-prune(1)) are better off aborting rather than ignoring broken refs\n(and thus considering the history they point to as not worth saving). The default value\nis 1 (i.e., be paranoid about detecting and aborting all operations). You should not\nnormally need to set this to 0, but it may be useful when trying to salvage data from a\ncorrupted repository.\n\nGITCOMMITGRAPHPARANOIA\nWhen loading a commit object from the commit-graph, Git performs an existence check on\nthe object in the object database. This is done to avoid issues with stale commit-graphs\nthat contain references to already-deleted commits, but comes with a performance penalty.\n\nThe default is \"true\", which enables the aforementioned behavior. Setting this to \"false\"\ndisables the existence check. This can lead to a performance improvement at the cost of\nconsistency.\n\nGITALLOWPROTOCOL\nIf set to a colon-separated list of protocols, behave as if protocol.allow is set to\nnever, and each of the listed protocols has protocol.<name>.allow set to always\n(overriding any existing configuration). See the description of protocol.allow in git-\nconfig(1) for more details.\n\nGITPROTOCOLFROMUSER\nSet this Boolean environment variable to false to prevent protocols used by\nfetch/push/clone which are configured to the user state. This is useful to restrict\nrecursive submodule initialization from an untrusted repository or for programs which\nfeed potentially-untrusted URLS to git commands. See git-config(1) for more details.\n\nGITPROTOCOL\nFor internal use only. Used in handshaking the wire protocol. Contains a colon :\nseparated list of keys with optional values key[=value]. Presence of unknown keys and\nvalues must be ignored.\n\nNote that servers may need to be configured to allow this variable to pass over some\ntransports. It will be propagated automatically when accessing local repositories (i.e.,\nfile:// or a filesystem path), as well as over the git:// protocol. For git-over-http, it\nshould work automatically in most configurations, but see the discussion in git-http-\nbackend(1). For git-over-ssh, the ssh server may need to be configured to allow clients\nto pass this variable (e.g., by using AcceptEnv GITPROTOCOL with OpenSSH).\n\nThis configuration is optional. If the variable is not propagated, then clients will fall\nback to the original \"v0\" protocol (but may miss out on some performance improvements or\nfeatures). This variable currently only affects clones and fetches; it is not yet used\nfor pushes (but may be in the future).\n\nGITOPTIONALLOCKS\nIf this Boolean environment variable is set to false, Git will complete any requested\noperation without performing any optional sub-operations that require taking a lock. For\nexample, this will prevent git status from refreshing the index as a side effect. This is\nuseful for processes running in the background which do not want to cause lock contention\nwith other operations on the repository. Defaults to 1.\n\nGITREDIRECTSTDIN, GITREDIRECTSTDOUT, GITREDIRECTSTDERR\nWindows-only: allow redirecting the standard input/output/error handles to paths\nspecified by the environment variables. This is particularly useful in multi-threaded\napplications where the canonical way to pass standard handles via CreateProcess() is not\nan option because it would require the handles to be marked inheritable (and consequently\nevery spawned process would inherit them, possibly blocking regular Git operations). The\nprimary intended use case is to use named pipes for communication (e.g.\n\\\\.\\pipe\\my-git-stdin-123).\n\nTwo special values are supported: off will simply close the corresponding standard\nhandle, and if GITREDIRECTSTDERR is 2>&1, standard error will be redirected to the same\nhandle as standard output.\n"
                },
                {
                    "name": "GIT_PRINT_SHA1_ELLIPSIS (deprecated)",
                    "content": "If set to yes, print an ellipsis following an (abbreviated) SHA-1 value. This affects\nindications of detached HEADs (git-checkout(1)) and the raw diff output (git-diff(1)).\nPrinting an ellipsis in the cases mentioned is no longer considered adequate and support\nfor it is likely to be removed in the foreseeable future (along with the variable).\n"
                }
            ]
        },
        "DISCUSSION": {
            "content": "More detail on the following is available from the Git concepts chapter of the user-manual[3]\nand gitcore-tutorial(7).\n\nA Git project normally consists of a working directory with a \".git\" subdirectory at the top\nlevel. The .git directory contains, among other things, a compressed object database\nrepresenting the complete history of the project, an \"index\" file which links that history to\nthe current contents of the working tree, and named pointers into that history such as tags\nand branch heads.\n\nThe object database contains objects of three main types: blobs, which hold file data; trees,\nwhich point to blobs and other trees to build up directory hierarchies; and commits, which\neach reference a single tree and some number of parent commits.\n\nThe commit, equivalent to what other systems call a \"changeset\" or \"version\", represents a\nstep in the project’s history, and each parent represents an immediately preceding step.\nCommits with more than one parent represent merges of independent lines of development.\n\nAll objects are named by the SHA-1 hash of their contents, normally written as a string of 40\nhex digits. Such names are globally unique. The entire history leading up to a commit can be\nvouched for by signing just that commit. A fourth object type, the tag, is provided for this\npurpose.\n\nWhen first created, objects are stored in individual files, but for efficiency may later be\ncompressed together into \"pack files\".\n\nNamed pointers called refs mark interesting points in history. A ref may contain the SHA-1\nname of an object or the name of another ref. Refs with names beginning ref/head/ contain the\nSHA-1 name of the most recent commit (or \"head\") of a branch under development. SHA-1 names\nof tags of interest are stored under ref/tags/. A special ref named HEAD contains the name of\nthe currently checked-out branch.\n\nThe index file is initialized with a list of all paths and, for each path, a blob object and\na set of attributes. The blob object represents the contents of the file as of the head of\nthe current branch. The attributes (last modified time, size, etc.) are taken from the\ncorresponding file in the working tree. Subsequent changes to the working tree can be found\nby comparing these attributes. The index may be updated with new content, and new commits may\nbe created from the content stored in the index.\n\nThe index is also capable of storing multiple entries (called \"stages\") for a given pathname.\nThese stages are used to hold the various unmerged version of a file when a merge is in\nprogress.\n",
            "subsections": []
        },
        "FURTHER DOCUMENTATION": {
            "content": "See the references in the \"description\" section to get started using Git. The following is\nprobably more detail than necessary for a first-time user.\n\nThe Git concepts chapter of the user-manual[3] and gitcore-tutorial(7) both provide\nintroductions to the underlying Git architecture.\n\nSee gitworkflows(7) for an overview of recommended workflows.\n\nSee also the howto[4] documents for some useful examples.\n\nThe internals are documented in the Git API documentation[5].\n\nUsers migrating from CVS may also want to read gitcvs-migration(7).\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Git was started by Linus Torvalds, and is currently maintained by Junio C Hamano. Numerous\ncontributions have come from the Git mailing list <git@vger.kernel.org[6]>.\nhttp://www.openhub.net/p/git/contributors/summary gives you a more complete list of\ncontributors.\n\nIf you have a clone of git.git itself, the output of git-shortlog(1) and git-blame(1) can\nshow you the authors for specific parts of the project.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs to the Git mailing list <git@vger.kernel.org[6]> where the development and\nmaintenance is primarily done. You do not have to be subscribed to the list to send a message\nthere. See the list archive at https://lore.kernel.org/git for previous bug reports and other\ndiscussions.\n\nIssues which are security relevant should be disclosed privately to the Git Security mailing\nlist <git-security@googlegroups.com[7]>.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gittutorial(7), gittutorial-2(7), giteveryday(7), gitcvs-migration(7), gitglossary(7),\ngitcore-tutorial(7), gitcli(7), The Git User’s Manual[1], gitworkflows(7)\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Git User’s Manual\nfile:///usr/share/doc/git/html/user-manual.html\n\n2. Trace2 documentation\nfile:///usr/share/doc/git/html/technical/api-trace2.html\n\n3. Git concepts chapter of the user-manual\nfile:///usr/share/doc/git/html/user-manual.html#git-concepts\n\n4. howto\nfile:///usr/share/doc/git/html/howto-index.html\n\n5. Git API documentation\nfile:///usr/share/doc/git/html/technical/api-index.html\n\n6. git@vger.kernel.org\nmailto:git@vger.kernel.org\n\n7. git-security@googlegroups.com\nmailto:git-security@googlegroups.com\n\nGit 2.43.0                                   07/02/2025                                       GIT(1)",
            "subsections": []
        }
    },
    "summary": "git - the stupid content tracker",
    "flags": [
        {
            "flag": "-v",
            "long": "--version",
            "arg": null,
            "description": "Prints the Git suite version that the git program came from. This option is internally converted to git version ... and accepts the same options as the git-version(1) command. If --help is also given, it takes precedence over --version."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Prints the synopsis and a list of the most commonly used commands. If the option --all or -a is given then all available commands are printed. If a Git command is named this option will bring up the manual page for that command. Other options are available to control how the manual page is displayed. See git-help(1) for more information, because git --help ... is converted internally into git help ...."
        },
        {
            "flag": "-C",
            "long": null,
            "arg": "<path>",
            "description": "Run as if git was started in <path> instead of the current working directory. When multiple -C options are given, each subsequent non-absolute -C <path> is interpreted relative to the preceding -C <path>. If <path> is present but empty, e.g. -C \"\", then the current working directory is left unchanged. This option affects options that expect path name like --git-dir and --work-tree in that their interpretations of the path names would be made relative to the working directory caused by the -C option. For example the following invocations are equivalent: git --git-dir=a.git --work-tree=b -C c status git --git-dir=c/a.git --work-tree=c/b status -c <name>=<value> Pass a configuration parameter to the command. The value given will override values from configuration files. The <name> is expected in the same format as listed by git config (subkeys separated by dots). Note that omitting the = in git -c foo.bar ... is allowed and sets foo.bar to the boolean true value (just like [foo]bar would in a config file). Including the equals but with an empty value (like git -c foo.bar= ...) sets foo.bar to the empty string which git config --type=bool will convert to false. --config-env=<name>=<envvar> Like -c <name>=<value>, give configuration variable <name> a value, where <envvar> is the name of an environment variable from which to retrieve the value. Unlike -c there is no shortcut for directly setting the value to an empty string, instead the environment variable itself must be set to the empty string. It is an error if the <envvar> does not exist in the environment. <envvar> may not contain an equals sign to avoid ambiguity with <name> containing one. This is useful for cases where you want to pass transitory configuration options to git, but are doing so on operating systems where other processes might be able to read your command line (e.g. /proc/self/cmdline), but not your environment (e.g. /proc/self/environ). That behavior is the default on Linux, but may not be on your system. Note that this might add security for variables such as http.extraHeader where the sensitive information is part of the value, but not e.g. url.<base>.insteadOf where the sensitive information can be part of the key. --exec-path[=<path>] Path to wherever your core Git programs are installed. This can also be controlled by setting the GITEXECPATH environment variable. If no path is given, git will print the current setting and then exit."
        },
        {
            "flag": "",
            "long": "--html-path",
            "arg": null,
            "description": "Print the path, without trailing slash, where Git’s HTML documentation is installed and exit."
        },
        {
            "flag": "",
            "long": "--man-path",
            "arg": null,
            "description": "Print the manpath (see man(1)) for the man pages for this version of Git and exit."
        },
        {
            "flag": "",
            "long": "--info-path",
            "arg": null,
            "description": "Print the path where the Info files documenting this version of Git are installed and exit."
        },
        {
            "flag": "-p",
            "long": "--paginate",
            "arg": null,
            "description": "Pipe all output into less (or if set, $PAGER) if standard output is a terminal. This overrides the pager.<cmd> configuration options (see the \"Configuration Mechanism\" section below)."
        },
        {
            "flag": "-P",
            "long": "--no-pager",
            "arg": null,
            "description": "Do not pipe Git output into a pager. --git-dir=<path> Set the path to the repository (\".git\" directory). This can also be controlled by setting the GITDIR environment variable. It can be an absolute path or relative path to current working directory. Specifying the location of the \".git\" directory using this option (or GITDIR environment variable) turns off the repository discovery that tries to find a directory with \".git\" subdirectory (which is how the repository and the top-level of the working tree are discovered), and tells Git that you are at the top level of the working tree. If you are not at the top-level directory of the working tree, you should tell Git where the top-level of the working tree is, with the --work-tree=<path> option (or GITWORKTREE environment variable) If you just want to run git as if it was started in <path> then use git -C <path>. --work-tree=<path> Set the path to the working tree. It can be an absolute path or a path relative to the current working directory. This can also be controlled by setting the GITWORKTREE environment variable and the core.worktree configuration variable (see core.worktree in git-config(1) for a more detailed discussion). --namespace=<path> Set the Git namespace. See gitnamespaces(7) for more details. Equivalent to setting the GITNAMESPACE environment variable."
        },
        {
            "flag": "",
            "long": "--bare",
            "arg": null,
            "description": "Treat the repository as a bare repository. If GITDIR environment is not set, it is set to the current working directory."
        },
        {
            "flag": "",
            "long": "--no-replace-objects",
            "arg": null,
            "description": "Do not use replacement refs to replace Git objects. See git-replace(1) for more information."
        },
        {
            "flag": "",
            "long": "--literal-pathspecs",
            "arg": null,
            "description": "Treat pathspecs literally (i.e. no globbing, no pathspec magic). This is equivalent to setting the GITLITERALPATHSPECS environment variable to 1."
        },
        {
            "flag": "",
            "long": "--glob-pathspecs",
            "arg": null,
            "description": "Add \"glob\" magic to all pathspec. This is equivalent to setting the GITGLOBPATHSPECS environment variable to 1. Disabling globbing on individual pathspecs can be done using pathspec magic \":(literal)\""
        },
        {
            "flag": "",
            "long": "--noglob-pathspecs",
            "arg": null,
            "description": "Add \"literal\" magic to all pathspec. This is equivalent to setting the GITNOGLOBPATHSPECS environment variable to 1. Enabling globbing on individual pathspecs can be done using pathspec magic \":(glob)\""
        },
        {
            "flag": "",
            "long": "--icase-pathspecs",
            "arg": null,
            "description": "Add \"icase\" magic to all pathspec. This is equivalent to setting the GITICASEPATHSPECS environment variable to 1."
        },
        {
            "flag": "",
            "long": "--no-optional-locks",
            "arg": null,
            "description": "Do not perform optional operations that require locks. This is equivalent to setting the GITOPTIONALLOCKS to 0. --list-cmds=group[,group...] List commands by group. This is an internal/experimental option and may change or be removed in the future. Supported groups are: builtins, parseopt (builtin commands that use parse-options), main (all commands in libexec directory), others (all other commands in $PATH that have git- prefix), list-<category> (see categories in command-list.txt), nohelpers (exclude helper commands), alias and config (retrieve command list from config variable completion.commands) --attr-source=<tree-ish> Read gitattributes from <tree-ish> instead of the worktree. See gitattributes(5). This is equivalent to setting the GITATTRSOURCE environment variable."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "gittutorial",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gittutorial/7/json"
        },
        {
            "name": "gittutorial-2",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gittutorial-2/7/json"
        },
        {
            "name": "giteveryday",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/giteveryday/7/json"
        },
        {
            "name": "gitcvs-migration",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gitcvs-migration/7/json"
        },
        {
            "name": "gitglossary",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gitglossary/7/json"
        },
        {
            "name": "gitcore-tutorial",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gitcore-tutorial/7/json"
        },
        {
            "name": "gitcli",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gitcli/7/json"
        },
        {
            "name": "gitworkflows",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/gitworkflows/7/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Distributed version control system.",
        "examples": [
            {
                "description": "Create an empty Git repository",
                "command": "git init"
            },
            {
                "description": "Clone a remote Git repository from the internet",
                "command": "git clone {{https://example.com/repo.git}}"
            },
            {
                "description": "View the status of the local repository",
                "command": "git status"
            },
            {
                "description": "Stage all changes for a commit",
                "command": "git add {{-A|--all}}"
            },
            {
                "description": "Commit changes to version history",
                "command": "git commit {{-m|--message}} {{message_text}}"
            },
            {
                "description": "Push local commits to a remote repository",
                "command": "git push"
            },
            {
                "description": "Pull any changes made to a remote",
                "command": "git pull"
            },
            {
                "description": "Reset everything the way it was in the latest commit",
                "command": "git reset --hard; git clean {{-f|--force}}"
            }
        ]
    }
}