Documentation / git.txton commit Git 1.7.11 (0ce2e39)
   1git(1)
   2======
   3
   4NAME
   5----
   6git - the stupid content tracker
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git' [--version] [--help] [-c <name>=<value>]
  13    [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
  14    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
  15    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
  16    <command> [<args>]
  17
  18DESCRIPTION
  19-----------
  20Git is a fast, scalable, distributed revision control system with an
  21unusually rich command set that provides both high-level operations
  22and full access to internals.
  23
  24See linkgit:gittutorial[7] to get started, then see
  25link:everyday.html[Everyday Git] for a useful minimum set of commands, and
  26"man git-commandname" for documentation of each command.  CVS users may
  27also want to read linkgit:gitcvs-migration[7].  See
  28the link:user-manual.html[Git User's Manual] for a more in-depth
  29introduction.
  30
  31The '<command>' is either a name of a Git command (see below) or an alias
  32as defined in the configuration file (see linkgit:git-config[1]).
  33
  34Formatted and hyperlinked version of the latest git
  35documentation can be viewed at
  36`http://www.kernel.org/pub/software/scm/git/docs/`.
  37
  38ifdef::stalenotes[]
  39[NOTE]
  40============
  41
  42You are reading the documentation for the latest (possibly
  43unreleased) version of git, that is available from 'master'
  44branch of the `git.git` repository.
  45Documentation for older releases are available here:
  46
  47* link:v1.7.11/git.html[documentation for release 1.7.11]
  48
  49* release notes for
  50  link:RelNotes/1.7.11.txt[1.7.11].
  51
  52* link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
  53
  54* release notes for
  55  link:RelNotes/1.7.10.5.txt[1.7.10.5],
  56  link:RelNotes/1.7.10.4.txt[1.7.10.4],
  57  link:RelNotes/1.7.10.3.txt[1.7.10.3],
  58  link:RelNotes/1.7.10.2.txt[1.7.10.2],
  59  link:RelNotes/1.7.10.1.txt[1.7.10.1],
  60  link:RelNotes/1.7.10.txt[1.7.10].
  61
  62* link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
  63
  64* release notes for
  65  link:RelNotes/1.7.9.7.txt[1.7.9.7],
  66  link:RelNotes/1.7.9.6.txt[1.7.9.6],
  67  link:RelNotes/1.7.9.5.txt[1.7.9.5],
  68  link:RelNotes/1.7.9.4.txt[1.7.9.4],
  69  link:RelNotes/1.7.9.3.txt[1.7.9.3],
  70  link:RelNotes/1.7.9.2.txt[1.7.9.2],
  71  link:RelNotes/1.7.9.1.txt[1.7.9.1],
  72  link:RelNotes/1.7.9.txt[1.7.9].
  73
  74* link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
  75
  76* release notes for
  77  link:RelNotes/1.7.8.6.txt[1.7.8.6],
  78  link:RelNotes/1.7.8.5.txt[1.7.8.5],
  79  link:RelNotes/1.7.8.4.txt[1.7.8.4],
  80  link:RelNotes/1.7.8.3.txt[1.7.8.3],
  81  link:RelNotes/1.7.8.2.txt[1.7.8.2],
  82  link:RelNotes/1.7.8.1.txt[1.7.8.1],
  83  link:RelNotes/1.7.8.txt[1.7.8].
  84
  85* link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
  86
  87* release notes for
  88  link:RelNotes/1.7.7.7.txt[1.7.7.7],
  89  link:RelNotes/1.7.7.6.txt[1.7.7.6],
  90  link:RelNotes/1.7.7.5.txt[1.7.7.5],
  91  link:RelNotes/1.7.7.4.txt[1.7.7.4],
  92  link:RelNotes/1.7.7.3.txt[1.7.7.3],
  93  link:RelNotes/1.7.7.2.txt[1.7.7.2],
  94  link:RelNotes/1.7.7.1.txt[1.7.7.1],
  95  link:RelNotes/1.7.7.txt[1.7.7].
  96
  97* link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
  98
  99* release notes for
 100  link:RelNotes/1.7.6.6.txt[1.7.6.6],
 101  link:RelNotes/1.7.6.5.txt[1.7.6.5],
 102  link:RelNotes/1.7.6.4.txt[1.7.6.4],
 103  link:RelNotes/1.7.6.3.txt[1.7.6.3],
 104  link:RelNotes/1.7.6.2.txt[1.7.6.2],
 105  link:RelNotes/1.7.6.1.txt[1.7.6.1],
 106  link:RelNotes/1.7.6.txt[1.7.6].
 107
 108* link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
 109
 110* release notes for
 111  link:RelNotes/1.7.5.4.txt[1.7.5.4],
 112  link:RelNotes/1.7.5.3.txt[1.7.5.3],
 113  link:RelNotes/1.7.5.2.txt[1.7.5.2],
 114  link:RelNotes/1.7.5.1.txt[1.7.5.1],
 115  link:RelNotes/1.7.5.txt[1.7.5].
 116
 117* link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
 118
 119* release notes for
 120  link:RelNotes/1.7.4.5.txt[1.7.4.5],
 121  link:RelNotes/1.7.4.4.txt[1.7.4.4],
 122  link:RelNotes/1.7.4.3.txt[1.7.4.3],
 123  link:RelNotes/1.7.4.2.txt[1.7.4.2],
 124  link:RelNotes/1.7.4.1.txt[1.7.4.1],
 125  link:RelNotes/1.7.4.txt[1.7.4].
 126
 127* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
 128
 129* release notes for
 130  link:RelNotes/1.7.3.5.txt[1.7.3.5],
 131  link:RelNotes/1.7.3.4.txt[1.7.3.4],
 132  link:RelNotes/1.7.3.3.txt[1.7.3.3],
 133  link:RelNotes/1.7.3.2.txt[1.7.3.2],
 134  link:RelNotes/1.7.3.1.txt[1.7.3.1],
 135  link:RelNotes/1.7.3.txt[1.7.3].
 136
 137* link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
 138
 139* release notes for
 140  link:RelNotes/1.7.2.5.txt[1.7.2.5],
 141  link:RelNotes/1.7.2.4.txt[1.7.2.4],
 142  link:RelNotes/1.7.2.3.txt[1.7.2.3],
 143  link:RelNotes/1.7.2.2.txt[1.7.2.2],
 144  link:RelNotes/1.7.2.1.txt[1.7.2.1],
 145  link:RelNotes/1.7.2.txt[1.7.2].
 146
 147* link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
 148
 149* release notes for
 150  link:RelNotes/1.7.1.4.txt[1.7.1.4],
 151  link:RelNotes/1.7.1.3.txt[1.7.1.3],
 152  link:RelNotes/1.7.1.2.txt[1.7.1.2],
 153  link:RelNotes/1.7.1.1.txt[1.7.1.1],
 154  link:RelNotes/1.7.1.txt[1.7.1].
 155
 156* link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
 157
 158* release notes for
 159  link:RelNotes/1.7.0.9.txt[1.7.0.9],
 160  link:RelNotes/1.7.0.8.txt[1.7.0.8],
 161  link:RelNotes/1.7.0.7.txt[1.7.0.7],
 162  link:RelNotes/1.7.0.6.txt[1.7.0.6],
 163  link:RelNotes/1.7.0.5.txt[1.7.0.5],
 164  link:RelNotes/1.7.0.4.txt[1.7.0.4],
 165  link:RelNotes/1.7.0.3.txt[1.7.0.3],
 166  link:RelNotes/1.7.0.2.txt[1.7.0.2],
 167  link:RelNotes/1.7.0.1.txt[1.7.0.1],
 168  link:RelNotes/1.7.0.txt[1.7.0].
 169
 170* link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
 171
 172* release notes for
 173  link:RelNotes/1.6.6.3.txt[1.6.6.3],
 174  link:RelNotes/1.6.6.2.txt[1.6.6.2],
 175  link:RelNotes/1.6.6.1.txt[1.6.6.1],
 176  link:RelNotes/1.6.6.txt[1.6.6].
 177
 178* link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
 179
 180* release notes for
 181  link:RelNotes/1.6.5.9.txt[1.6.5.9],
 182  link:RelNotes/1.6.5.8.txt[1.6.5.8],
 183  link:RelNotes/1.6.5.7.txt[1.6.5.7],
 184  link:RelNotes/1.6.5.6.txt[1.6.5.6],
 185  link:RelNotes/1.6.5.5.txt[1.6.5.5],
 186  link:RelNotes/1.6.5.4.txt[1.6.5.4],
 187  link:RelNotes/1.6.5.3.txt[1.6.5.3],
 188  link:RelNotes/1.6.5.2.txt[1.6.5.2],
 189  link:RelNotes/1.6.5.1.txt[1.6.5.1],
 190  link:RelNotes/1.6.5.txt[1.6.5].
 191
 192* link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
 193
 194* release notes for
 195  link:RelNotes/1.6.4.5.txt[1.6.4.5],
 196  link:RelNotes/1.6.4.4.txt[1.6.4.4],
 197  link:RelNotes/1.6.4.3.txt[1.6.4.3],
 198  link:RelNotes/1.6.4.2.txt[1.6.4.2],
 199  link:RelNotes/1.6.4.1.txt[1.6.4.1],
 200  link:RelNotes/1.6.4.txt[1.6.4].
 201
 202* link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
 203
 204* release notes for
 205  link:RelNotes/1.6.3.4.txt[1.6.3.4],
 206  link:RelNotes/1.6.3.3.txt[1.6.3.3],
 207  link:RelNotes/1.6.3.2.txt[1.6.3.2],
 208  link:RelNotes/1.6.3.1.txt[1.6.3.1],
 209  link:RelNotes/1.6.3.txt[1.6.3].
 210
 211* release notes for
 212  link:RelNotes/1.6.2.5.txt[1.6.2.5],
 213  link:RelNotes/1.6.2.4.txt[1.6.2.4],
 214  link:RelNotes/1.6.2.3.txt[1.6.2.3],
 215  link:RelNotes/1.6.2.2.txt[1.6.2.2],
 216  link:RelNotes/1.6.2.1.txt[1.6.2.1],
 217  link:RelNotes/1.6.2.txt[1.6.2].
 218
 219* link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
 220
 221* release notes for
 222  link:RelNotes/1.6.1.3.txt[1.6.1.3],
 223  link:RelNotes/1.6.1.2.txt[1.6.1.2],
 224  link:RelNotes/1.6.1.1.txt[1.6.1.1],
 225  link:RelNotes/1.6.1.txt[1.6.1].
 226
 227* link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
 228
 229* release notes for
 230  link:RelNotes/1.6.0.6.txt[1.6.0.6],
 231  link:RelNotes/1.6.0.5.txt[1.6.0.5],
 232  link:RelNotes/1.6.0.4.txt[1.6.0.4],
 233  link:RelNotes/1.6.0.3.txt[1.6.0.3],
 234  link:RelNotes/1.6.0.2.txt[1.6.0.2],
 235  link:RelNotes/1.6.0.1.txt[1.6.0.1],
 236  link:RelNotes/1.6.0.txt[1.6.0].
 237
 238* link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
 239
 240* release notes for
 241  link:RelNotes/1.5.6.6.txt[1.5.6.6],
 242  link:RelNotes/1.5.6.5.txt[1.5.6.5],
 243  link:RelNotes/1.5.6.4.txt[1.5.6.4],
 244  link:RelNotes/1.5.6.3.txt[1.5.6.3],
 245  link:RelNotes/1.5.6.2.txt[1.5.6.2],
 246  link:RelNotes/1.5.6.1.txt[1.5.6.1],
 247  link:RelNotes/1.5.6.txt[1.5.6].
 248
 249* link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
 250
 251* release notes for
 252  link:RelNotes/1.5.5.6.txt[1.5.5.6],
 253  link:RelNotes/1.5.5.5.txt[1.5.5.5],
 254  link:RelNotes/1.5.5.4.txt[1.5.5.4],
 255  link:RelNotes/1.5.5.3.txt[1.5.5.3],
 256  link:RelNotes/1.5.5.2.txt[1.5.5.2],
 257  link:RelNotes/1.5.5.1.txt[1.5.5.1],
 258  link:RelNotes/1.5.5.txt[1.5.5].
 259
 260* link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
 261
 262* release notes for
 263  link:RelNotes/1.5.4.7.txt[1.5.4.7],
 264  link:RelNotes/1.5.4.6.txt[1.5.4.6],
 265  link:RelNotes/1.5.4.5.txt[1.5.4.5],
 266  link:RelNotes/1.5.4.4.txt[1.5.4.4],
 267  link:RelNotes/1.5.4.3.txt[1.5.4.3],
 268  link:RelNotes/1.5.4.2.txt[1.5.4.2],
 269  link:RelNotes/1.5.4.1.txt[1.5.4.1],
 270  link:RelNotes/1.5.4.txt[1.5.4].
 271
 272* link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
 273
 274* release notes for
 275  link:RelNotes/1.5.3.8.txt[1.5.3.8],
 276  link:RelNotes/1.5.3.7.txt[1.5.3.7],
 277  link:RelNotes/1.5.3.6.txt[1.5.3.6],
 278  link:RelNotes/1.5.3.5.txt[1.5.3.5],
 279  link:RelNotes/1.5.3.4.txt[1.5.3.4],
 280  link:RelNotes/1.5.3.3.txt[1.5.3.3],
 281  link:RelNotes/1.5.3.2.txt[1.5.3.2],
 282  link:RelNotes/1.5.3.1.txt[1.5.3.1],
 283  link:RelNotes/1.5.3.txt[1.5.3].
 284
 285* link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
 286
 287* release notes for
 288  link:RelNotes/1.5.2.5.txt[1.5.2.5],
 289  link:RelNotes/1.5.2.4.txt[1.5.2.4],
 290  link:RelNotes/1.5.2.3.txt[1.5.2.3],
 291  link:RelNotes/1.5.2.2.txt[1.5.2.2],
 292  link:RelNotes/1.5.2.1.txt[1.5.2.1],
 293  link:RelNotes/1.5.2.txt[1.5.2].
 294
 295* link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
 296
 297* release notes for
 298  link:RelNotes/1.5.1.6.txt[1.5.1.6],
 299  link:RelNotes/1.5.1.5.txt[1.5.1.5],
 300  link:RelNotes/1.5.1.4.txt[1.5.1.4],
 301  link:RelNotes/1.5.1.3.txt[1.5.1.3],
 302  link:RelNotes/1.5.1.2.txt[1.5.1.2],
 303  link:RelNotes/1.5.1.1.txt[1.5.1.1],
 304  link:RelNotes/1.5.1.txt[1.5.1].
 305
 306* link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
 307
 308* release notes for
 309  link:RelNotes/1.5.0.7.txt[1.5.0.7],
 310  link:RelNotes/1.5.0.6.txt[1.5.0.6],
 311  link:RelNotes/1.5.0.5.txt[1.5.0.5],
 312  link:RelNotes/1.5.0.3.txt[1.5.0.3],
 313  link:RelNotes/1.5.0.2.txt[1.5.0.2],
 314  link:RelNotes/1.5.0.1.txt[1.5.0.1],
 315  link:RelNotes/1.5.0.txt[1.5.0].
 316
 317* documentation for release link:v1.4.4.4/git.html[1.4.4.4],
 318  link:v1.3.3/git.html[1.3.3],
 319  link:v1.2.6/git.html[1.2.6],
 320  link:v1.0.13/git.html[1.0.13].
 321
 322============
 323
 324endif::stalenotes[]
 325
 326OPTIONS
 327-------
 328--version::
 329        Prints the git suite version that the 'git' program came from.
 330
 331--help::
 332        Prints the synopsis and a list of the most commonly used
 333        commands. If the option '--all' or '-a' is given then all
 334        available commands are printed. If a git command is named this
 335        option will bring up the manual page for that command.
 336+
 337Other options are available to control how the manual page is
 338displayed. See linkgit:git-help[1] for more information,
 339because `git --help ...` is converted internally into `git
 340help ...`.
 341
 342-c <name>=<value>::
 343        Pass a configuration parameter to the command. The value
 344        given will override values from configuration files.
 345        The <name> is expected in the same format as listed by
 346        'git config' (subkeys separated by dots).
 347
 348--exec-path[=<path>]::
 349        Path to wherever your core git programs are installed.
 350        This can also be controlled by setting the GIT_EXEC_PATH
 351        environment variable. If no path is given, 'git' will print
 352        the current setting and then exit.
 353
 354--html-path::
 355        Print the path, without trailing slash, where git's HTML
 356        documentation is installed and exit.
 357
 358--man-path::
 359        Print the manpath (see `man(1)`) for the man pages for
 360        this version of git and exit.
 361
 362--info-path::
 363        Print the path where the Info files documenting this
 364        version of git are installed and exit.
 365
 366-p::
 367--paginate::
 368        Pipe all output into 'less' (or if set, $PAGER) if standard
 369        output is a terminal.  This overrides the `pager.<cmd>`
 370        configuration options (see the "Configuration Mechanism" section
 371        below).
 372
 373--no-pager::
 374        Do not pipe git output into a pager.
 375
 376--git-dir=<path>::
 377        Set the path to the repository. This can also be controlled by
 378        setting the GIT_DIR environment variable. It can be an absolute
 379        path or relative path to current working directory.
 380
 381--work-tree=<path>::
 382        Set the path to the working tree. It can be an absolute path
 383        or a path relative to the current working directory.
 384        This can also be controlled by setting the GIT_WORK_TREE
 385        environment variable and the core.worktree configuration
 386        variable (see core.worktree in linkgit:git-config[1] for a
 387        more detailed discussion).
 388
 389--namespace=<path>::
 390        Set the git namespace.  See linkgit:gitnamespaces[7] for more
 391        details.  Equivalent to setting the `GIT_NAMESPACE` environment
 392        variable.
 393
 394--bare::
 395        Treat the repository as a bare repository.  If GIT_DIR
 396        environment is not set, it is set to the current working
 397        directory.
 398
 399--no-replace-objects::
 400        Do not use replacement refs to replace git objects. See
 401        linkgit:git-replace[1] for more information.
 402
 403
 404FURTHER DOCUMENTATION
 405---------------------
 406
 407See the references above to get started using git.  The following is
 408probably more detail than necessary for a first-time user.
 409
 410The link:user-manual.html#git-concepts[git concepts chapter of the
 411user-manual] and linkgit:gitcore-tutorial[7] both provide
 412introductions to the underlying git architecture.
 413
 414See linkgit:gitworkflows[7] for an overview of recommended workflows.
 415
 416See also the link:howto-index.html[howto] documents for some useful
 417examples.
 418
 419The internals are documented in the
 420link:technical/api-index.html[GIT API documentation].
 421
 422GIT COMMANDS
 423------------
 424
 425We divide git into high level ("porcelain") commands and low level
 426("plumbing") commands.
 427
 428High-level commands (porcelain)
 429-------------------------------
 430
 431We separate the porcelain commands into the main commands and some
 432ancillary user utilities.
 433
 434Main porcelain commands
 435~~~~~~~~~~~~~~~~~~~~~~~
 436
 437include::cmds-mainporcelain.txt[]
 438
 439Ancillary Commands
 440~~~~~~~~~~~~~~~~~~
 441Manipulators:
 442
 443include::cmds-ancillarymanipulators.txt[]
 444
 445Interrogators:
 446
 447include::cmds-ancillaryinterrogators.txt[]
 448
 449
 450Interacting with Others
 451~~~~~~~~~~~~~~~~~~~~~~~
 452
 453These commands are to interact with foreign SCM and with other
 454people via patch over e-mail.
 455
 456include::cmds-foreignscminterface.txt[]
 457
 458
 459Low-level commands (plumbing)
 460-----------------------------
 461
 462Although git includes its
 463own porcelain layer, its low-level commands are sufficient to support
 464development of alternative porcelains.  Developers of such porcelains
 465might start by reading about linkgit:git-update-index[1] and
 466linkgit:git-read-tree[1].
 467
 468The interface (input, output, set of options and the semantics)
 469to these low-level commands are meant to be a lot more stable
 470than Porcelain level commands, because these commands are
 471primarily for scripted use.  The interface to Porcelain commands
 472on the other hand are subject to change in order to improve the
 473end user experience.
 474
 475The following description divides
 476the low-level commands into commands that manipulate objects (in
 477the repository, index, and working tree), commands that interrogate and
 478compare objects, and commands that move objects and references between
 479repositories.
 480
 481
 482Manipulation commands
 483~~~~~~~~~~~~~~~~~~~~~
 484
 485include::cmds-plumbingmanipulators.txt[]
 486
 487
 488Interrogation commands
 489~~~~~~~~~~~~~~~~~~~~~~
 490
 491include::cmds-plumbinginterrogators.txt[]
 492
 493In general, the interrogate commands do not touch the files in
 494the working tree.
 495
 496
 497Synching repositories
 498~~~~~~~~~~~~~~~~~~~~~
 499
 500include::cmds-synchingrepositories.txt[]
 501
 502The following are helper commands used by the above; end users
 503typically do not use them directly.
 504
 505include::cmds-synchelpers.txt[]
 506
 507
 508Internal helper commands
 509~~~~~~~~~~~~~~~~~~~~~~~~
 510
 511These are internal helper commands used by other commands; end
 512users typically do not use them directly.
 513
 514include::cmds-purehelpers.txt[]
 515
 516
 517Configuration Mechanism
 518-----------------------
 519
 520Starting from 0.99.9 (actually mid 0.99.8.GIT), `.git/config` file
 521is used to hold per-repository configuration options.  It is a
 522simple text file modeled after `.ini` format familiar to some
 523people.  Here is an example:
 524
 525------------
 526#
 527# A '#' or ';' character indicates a comment.
 528#
 529
 530; core variables
 531[core]
 532        ; Don't trust file modes
 533        filemode = false
 534
 535; user identity
 536[user]
 537        name = "Junio C Hamano"
 538        email = "junkio@twinsun.com"
 539
 540------------
 541
 542Various commands read from the configuration file and adjust
 543their operation accordingly.  See linkgit:git-config[1] for a
 544list.
 545
 546
 547Identifier Terminology
 548----------------------
 549<object>::
 550        Indicates the object name for any type of object.
 551
 552<blob>::
 553        Indicates a blob object name.
 554
 555<tree>::
 556        Indicates a tree object name.
 557
 558<commit>::
 559        Indicates a commit object name.
 560
 561<tree-ish>::
 562        Indicates a tree, commit or tag object name.  A
 563        command that takes a <tree-ish> argument ultimately wants to
 564        operate on a <tree> object but automatically dereferences
 565        <commit> and <tag> objects that point at a <tree>.
 566
 567<commit-ish>::
 568        Indicates a commit or tag object name.  A
 569        command that takes a <commit-ish> argument ultimately wants to
 570        operate on a <commit> object but automatically dereferences
 571        <tag> objects that point at a <commit>.
 572
 573<type>::
 574        Indicates that an object type is required.
 575        Currently one of: `blob`, `tree`, `commit`, or `tag`.
 576
 577<file>::
 578        Indicates a filename - almost always relative to the
 579        root of the tree structure `GIT_INDEX_FILE` describes.
 580
 581Symbolic Identifiers
 582--------------------
 583Any git command accepting any <object> can also use the following
 584symbolic notation:
 585
 586HEAD::
 587        indicates the head of the current branch.
 588
 589<tag>::
 590        a valid tag 'name'
 591        (i.e. a `refs/tags/<tag>` reference).
 592
 593<head>::
 594        a valid head 'name'
 595        (i.e. a `refs/heads/<head>` reference).
 596
 597For a more complete list of ways to spell object names, see
 598"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
 599
 600
 601File/Directory Structure
 602------------------------
 603
 604Please see the linkgit:gitrepository-layout[5] document.
 605
 606Read linkgit:githooks[5] for more details about each hook.
 607
 608Higher level SCMs may provide and manage additional information in the
 609`$GIT_DIR`.
 610
 611
 612Terminology
 613-----------
 614Please see linkgit:gitglossary[7].
 615
 616
 617Environment Variables
 618---------------------
 619Various git commands use the following environment variables:
 620
 621The git Repository
 622~~~~~~~~~~~~~~~~~~
 623These environment variables apply to 'all' core git commands. Nb: it
 624is worth noting that they may be used/overridden by SCMS sitting above
 625git so take care if using Cogito etc.
 626
 627'GIT_INDEX_FILE'::
 628        This environment allows the specification of an alternate
 629        index file. If not specified, the default of `$GIT_DIR/index`
 630        is used.
 631
 632'GIT_OBJECT_DIRECTORY'::
 633        If the object storage directory is specified via this
 634        environment variable then the sha1 directories are created
 635        underneath - otherwise the default `$GIT_DIR/objects`
 636        directory is used.
 637
 638'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
 639        Due to the immutable nature of git objects, old objects can be
 640        archived into shared, read-only directories. This variable
 641        specifies a ":" separated (on Windows ";" separated) list
 642        of git object directories which can be used to search for git
 643        objects. New objects will not be written to these directories.
 644
 645'GIT_DIR'::
 646        If the 'GIT_DIR' environment variable is set then it
 647        specifies a path to use instead of the default `.git`
 648        for the base of the repository.
 649
 650'GIT_WORK_TREE'::
 651        Set the path to the working tree.  The value will not be
 652        used in combination with repositories found automatically in
 653        a .git directory (i.e. $GIT_DIR is not set).
 654        This can also be controlled by the '--work-tree' command line
 655        option and the core.worktree configuration variable.
 656
 657'GIT_NAMESPACE'::
 658        Set the git namespace; see linkgit:gitnamespaces[7] for details.
 659        The '--namespace' command-line option also sets this value.
 660
 661'GIT_CEILING_DIRECTORIES'::
 662        This should be a colon-separated list of absolute paths.
 663        If set, it is a list of directories that git should not chdir
 664        up into while looking for a repository directory.
 665        It will not exclude the current working directory or
 666        a GIT_DIR set on the command line or in the environment.
 667        (Useful for excluding slow-loading network directories.)
 668
 669'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
 670        When run in a directory that does not have ".git" repository
 671        directory, git tries to find such a directory in the parent
 672        directories to find the top of the working tree, but by default it
 673        does not cross filesystem boundaries.  This environment variable
 674        can be set to true to tell git not to stop at filesystem
 675        boundaries.  Like 'GIT_CEILING_DIRECTORIES', this will not affect
 676        an explicit repository directory set via 'GIT_DIR' or on the
 677        command line.
 678
 679git Commits
 680~~~~~~~~~~~
 681'GIT_AUTHOR_NAME'::
 682'GIT_AUTHOR_EMAIL'::
 683'GIT_AUTHOR_DATE'::
 684'GIT_COMMITTER_NAME'::
 685'GIT_COMMITTER_EMAIL'::
 686'GIT_COMMITTER_DATE'::
 687'EMAIL'::
 688        see linkgit:git-commit-tree[1]
 689
 690git Diffs
 691~~~~~~~~~
 692'GIT_DIFF_OPTS'::
 693        Only valid setting is "--unified=??" or "-u??" to set the
 694        number of context lines shown when a unified diff is created.
 695        This takes precedence over any "-U" or "--unified" option
 696        value passed on the git diff command line.
 697
 698'GIT_EXTERNAL_DIFF'::
 699        When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
 700        program named by it is called, instead of the diff invocation
 701        described above.  For a path that is added, removed, or modified,
 702        'GIT_EXTERNAL_DIFF' is called with 7 parameters:
 703
 704        path old-file old-hex old-mode new-file new-hex new-mode
 705+
 706where:
 707
 708        <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
 709                         contents of <old|new>,
 710        <old|new>-hex:: are the 40-hexdigit SHA1 hashes,
 711        <old|new>-mode:: are the octal representation of the file modes.
 712+
 713The file parameters can point at the user's working file
 714(e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
 715when a new file is added), or a temporary file (e.g. `old-file` in the
 716index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the
 717temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
 718+
 719For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
 720parameter, <path>.
 721
 722other
 723~~~~~
 724'GIT_MERGE_VERBOSITY'::
 725        A number controlling the amount of output shown by
 726        the recursive merge strategy.  Overrides merge.verbosity.
 727        See linkgit:git-merge[1]
 728
 729'GIT_PAGER'::
 730        This environment variable overrides `$PAGER`. If it is set
 731        to an empty string or to the value "cat", git will not launch
 732        a pager.  See also the `core.pager` option in
 733        linkgit:git-config[1].
 734
 735'GIT_EDITOR'::
 736        This environment variable overrides `$EDITOR` and `$VISUAL`.
 737        It is used by several git comands when, on interactive mode,
 738        an editor is to be launched. See also linkgit:git-var[1]
 739        and the `core.editor` option in linkgit:git-config[1].
 740
 741'GIT_SSH'::
 742        If this environment variable is set then 'git fetch'
 743        and 'git push' will use this command instead
 744        of 'ssh' when they need to connect to a remote system.
 745        The '$GIT_SSH' command will be given exactly two arguments:
 746        the 'username@host' (or just 'host') from the URL and the
 747        shell command to execute on that remote system.
 748+
 749To pass options to the program that you want to list in GIT_SSH
 750you will need to wrap the program and options into a shell script,
 751then set GIT_SSH to refer to the shell script.
 752+
 753Usually it is easier to configure any desired options through your
 754personal `.ssh/config` file.  Please consult your ssh documentation
 755for further details.
 756
 757'GIT_ASKPASS'::
 758        If this environment variable is set, then git commands which need to
 759        acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
 760        will call this program with a suitable prompt as command line argument
 761        and read the password from its STDOUT. See also the 'core.askpass'
 762        option in linkgit:git-config[1].
 763
 764'GIT_FLUSH'::
 765        If this environment variable is set to "1", then commands such
 766        as 'git blame' (in incremental mode), 'git rev-list', 'git log',
 767        and 'git whatchanged' will force a flush of the output stream
 768        after each commit-oriented record have been flushed.   If this
 769        variable is set to "0", the output of these commands will be done
 770        using completely buffered I/O.   If this environment variable is
 771        not set, git will choose buffered or record-oriented flushing
 772        based on whether stdout appears to be redirected to a file or not.
 773
 774'GIT_TRACE'::
 775        If this variable is set to "1", "2" or "true" (comparison
 776        is case insensitive), git will print `trace:` messages on
 777        stderr telling about alias expansion, built-in command
 778        execution and external command execution.
 779        If this variable is set to an integer value greater than 1
 780        and lower than 10 (strictly) then git will interpret this
 781        value as an open file descriptor and will try to write the
 782        trace messages into this file descriptor.
 783        Alternatively, if this variable is set to an absolute path
 784        (starting with a '/' character), git will interpret this
 785        as a file path and will try to write the trace messages
 786        into it.
 787
 788Discussion[[Discussion]]
 789------------------------
 790
 791More detail on the following is available from the
 792link:user-manual.html#git-concepts[git concepts chapter of the
 793user-manual] and linkgit:gitcore-tutorial[7].
 794
 795A git project normally consists of a working directory with a ".git"
 796subdirectory at the top level.  The .git directory contains, among other
 797things, a compressed object database representing the complete history
 798of the project, an "index" file which links that history to the current
 799contents of the working tree, and named pointers into that history such
 800as tags and branch heads.
 801
 802The object database contains objects of three main types: blobs, which
 803hold file data; trees, which point to blobs and other trees to build up
 804directory hierarchies; and commits, which each reference a single tree
 805and some number of parent commits.
 806
 807The commit, equivalent to what other systems call a "changeset" or
 808"version", represents a step in the project's history, and each parent
 809represents an immediately preceding step.  Commits with more than one
 810parent represent merges of independent lines of development.
 811
 812All objects are named by the SHA1 hash of their contents, normally
 813written as a string of 40 hex digits.  Such names are globally unique.
 814The entire history leading up to a commit can be vouched for by signing
 815just that commit.  A fourth object type, the tag, is provided for this
 816purpose.
 817
 818When first created, objects are stored in individual files, but for
 819efficiency may later be compressed together into "pack files".
 820
 821Named pointers called refs mark interesting points in history.  A ref
 822may contain the SHA1 name of an object or the name of another ref.  Refs
 823with names beginning `ref/head/` contain the SHA1 name of the most
 824recent commit (or "head") of a branch under development.  SHA1 names of
 825tags of interest are stored under `ref/tags/`.  A special ref named
 826`HEAD` contains the name of the currently checked-out branch.
 827
 828The index file is initialized with a list of all paths and, for each
 829path, a blob object and a set of attributes.  The blob object represents
 830the contents of the file as of the head of the current branch.  The
 831attributes (last modified time, size, etc.) are taken from the
 832corresponding file in the working tree.  Subsequent changes to the
 833working tree can be found by comparing these attributes.  The index may
 834be updated with new content, and new commits may be created from the
 835content stored in the index.
 836
 837The index is also capable of storing multiple entries (called "stages")
 838for a given pathname.  These stages are used to hold the various
 839unmerged version of a file when a merge is in progress.
 840
 841Authors
 842-------
 843Git was started by Linus Torvalds, and is currently maintained by Junio
 844C Hamano. Numerous contributions have come from the git mailing list
 845<git@vger.kernel.org>. For a more complete list of contributors, see
 846http://git-scm.com/about. If you have a clone of git.git itself, the
 847output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
 848the authors for specific parts of the project.
 849
 850Reporting Bugs
 851--------------
 852
 853Report bugs to the Git mailing list <git@vger.kernel.org> where the
 854development and maintenance is primarily done.  You do not have to be
 855subscribed to the list to send a message there.
 856
 857SEE ALSO
 858--------
 859linkgit:gittutorial[7], linkgit:gittutorial-2[7],
 860link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
 861linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
 862linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
 863linkgit:gitworkflows[7]
 864
 865GIT
 866---
 867Part of the linkgit:git[1] suite