OS Manuals

/usr/bin/git

distributed version control system

From git 2.56.0-r3 (os), captured 2026-11-05 by running git --help (exit 0). permalink

Also provided by 1 other package version
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]
           [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]
           [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone      Clone a repository into a new directory
   init       Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add        Add file contents to the index
   mv         Move or rename a file, a directory, or a symlink
   restore    Restore working tree files
   rm         Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect     Use binary search to find the commit that introduced a bug
   diff       Show changes between commits, commit and working tree, etc
   grep       Print lines matching a pattern
   log        Show commit logs
   show       Show various types of objects
   status     Show the working tree status

grow, mark and tweak your common history
   backfill   Download missing objects in a partial clone
   branch     List, create, or delete branches
   commit     Record changes to the repository
   history    EXPERIMENTAL: Rewrite history
   merge      Join two or more development histories together
   rebase     Reapply commits on top of another base tip
   reset      Set `HEAD` or the index to a known state
   switch     Switch branches
   tag        Create, list, delete or verify tags

collaborate (see also: git help workflows)
   fetch      Download objects and refs from another repository
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
Options (25)
OptionDescriptionSource
-v, --versionPrints the Git suite version that the git program came from.man
-h, --helpPrints the synopsis and a list of the most commonly used commands.man
-C pathRun as if git was started in <path> instead of the current working directory.man
-c name>=<valuePass a configuration parameter to the command.man
--config-env name>=<envvarLike -c <name>=<value>, give configuration variable <name> a value, where <envvar> is the name of an environment variable from which to retrieve the value.man
--exec-path pathPath to wherever your core Git programs are installed.man
--html-pathPrint the path, without trailing slash, where Git’s HTML documentation is installed and exit.man
--man-pathPrint the manpath (see man(1)) for the man pages for this version of Git and exit.man
--info-pathPrint the path where the Info files documenting this version of Git are installed and exit.man
-p, --paginatePipe all output into less (or if set, $PAGER) if standard output is a terminal.man
-P, --no-pagerDo not pipe Git output into a pager.man
--git-dir pathSet the path to the repository (".git" directory).man
--work-tree pathSet the path to the working tree.man
--namespace pathSet the Git namespace.man
--bareTreat the repository as a bare repository.man
--no-replace-objectsDo not use replacement refs to replace Git objects.man
--no-lazy-fetchDo not fetch missing objects from the promisor remote on demand.man
--no-optional-locksDo not perform optional operations that require locks.man
--no-adviceDisable all advice hints from being printed.man
--literal-pathspecsTreat pathspecs literally (i.e. no globbing, no pathspec magic).man
--glob-pathspecsAdd "glob" magic to all pathspec.man
--noglob-pathspecsAdd "literal" magic to all pathspec.man
--icase-pathspecsAdd "icase" magic to all pathspec.man
--list-cmds groupList commands by group.man
--attr-source tree-ishRead gitattributes from <tree-ish> instead of the worktree.man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.