Documentation / git.txton commit Merge branch 'jk/config-no-ungetc-eof' into maint (2250406)
   1git(1)
   2======
   3
   4NAME
   5----
   6git - the stupid content tracker
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git' [--version] [--help] [-C <path>] [-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
  25linkgit:giteveryday[7] for a useful minimum set of
  26commands.  The link:user-manual.html[Git User's Manual] has a more
  27in-depth introduction.
  28
  29After you mastered the basic concepts, you can come back to this
  30page to learn what commands Git offers.  You can learn more about
  31individual Git commands with "git help command".  linkgit:gitcli[7]
  32manual page gives you an overview of the command-line command syntax.
  33
  34Formatted and hyperlinked version of the latest Git documentation
  35can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
  36
  37ifdef::stalenotes[]
  38[NOTE]
  39============
  40
  41You are reading the documentation for the latest (possibly
  42unreleased) version of Git, that is available from the 'master'
  43branch of the `git.git` repository.
  44Documentation for older releases are available here:
  45
  46* link:v2.3.1/git.html[documentation for release 2.3.1]
  47
  48* release notes for
  49  link:RelNotes/2.3.1.txt[2.3.1],
  50  link:RelNotes/2.3.0.txt[2.3].
  51
  52* link:v2.2.2/git.html[documentation for release 2.2.2]
  53
  54* release notes for
  55  link:RelNotes/2.2.2.txt[2.2.2],
  56  link:RelNotes/2.2.1.txt[2.2.1],
  57  link:RelNotes/2.2.0.txt[2.2].
  58
  59* link:v2.1.4/git.html[documentation for release 2.1.4]
  60
  61* release notes for
  62  link:RelNotes/2.1.4.txt[2.1.4],
  63  link:RelNotes/2.1.3.txt[2.1.3],
  64  link:RelNotes/2.1.2.txt[2.1.2],
  65  link:RelNotes/2.1.1.txt[2.1.1],
  66  link:RelNotes/2.1.0.txt[2.1].
  67
  68* link:v2.0.5/git.html[documentation for release 2.0.5]
  69
  70* release notes for
  71  link:RelNotes/2.0.5.txt[2.0.5],
  72  link:RelNotes/2.0.4.txt[2.0.4],
  73  link:RelNotes/2.0.3.txt[2.0.3],
  74  link:RelNotes/2.0.2.txt[2.0.2],
  75  link:RelNotes/2.0.1.txt[2.0.1],
  76  link:RelNotes/2.0.0.txt[2.0.0].
  77
  78* link:v1.9.5/git.html[documentation for release 1.9.5]
  79
  80* release notes for
  81  link:RelNotes/1.9.5.txt[1.9.5],
  82  link:RelNotes/1.9.4.txt[1.9.4],
  83  link:RelNotes/1.9.3.txt[1.9.3],
  84  link:RelNotes/1.9.2.txt[1.9.2],
  85  link:RelNotes/1.9.1.txt[1.9.1],
  86  link:RelNotes/1.9.0.txt[1.9.0].
  87
  88* link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
  89
  90* release notes for
  91  link:RelNotes/1.8.5.6.txt[1.8.5.6],
  92  link:RelNotes/1.8.5.5.txt[1.8.5.5],
  93  link:RelNotes/1.8.5.4.txt[1.8.5.4],
  94  link:RelNotes/1.8.5.3.txt[1.8.5.3],
  95  link:RelNotes/1.8.5.2.txt[1.8.5.2],
  96  link:RelNotes/1.8.5.1.txt[1.8.5.1],
  97  link:RelNotes/1.8.5.txt[1.8.5].
  98
  99* link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
 100
 101* release notes for
 102  link:RelNotes/1.8.4.5.txt[1.8.4.5],
 103  link:RelNotes/1.8.4.4.txt[1.8.4.4],
 104  link:RelNotes/1.8.4.3.txt[1.8.4.3],
 105  link:RelNotes/1.8.4.2.txt[1.8.4.2],
 106  link:RelNotes/1.8.4.1.txt[1.8.4.1],
 107  link:RelNotes/1.8.4.txt[1.8.4].
 108
 109* link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
 110
 111* release notes for
 112  link:RelNotes/1.8.3.4.txt[1.8.3.4],
 113  link:RelNotes/1.8.3.3.txt[1.8.3.3],
 114  link:RelNotes/1.8.3.2.txt[1.8.3.2],
 115  link:RelNotes/1.8.3.1.txt[1.8.3.1],
 116  link:RelNotes/1.8.3.txt[1.8.3].
 117
 118* link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
 119
 120* release notes for
 121  link:RelNotes/1.8.2.3.txt[1.8.2.3],
 122  link:RelNotes/1.8.2.2.txt[1.8.2.2],
 123  link:RelNotes/1.8.2.1.txt[1.8.2.1],
 124  link:RelNotes/1.8.2.txt[1.8.2].
 125
 126* link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
 127
 128* release notes for
 129  link:RelNotes/1.8.1.6.txt[1.8.1.6],
 130  link:RelNotes/1.8.1.5.txt[1.8.1.5],
 131  link:RelNotes/1.8.1.4.txt[1.8.1.4],
 132  link:RelNotes/1.8.1.3.txt[1.8.1.3],
 133  link:RelNotes/1.8.1.2.txt[1.8.1.2],
 134  link:RelNotes/1.8.1.1.txt[1.8.1.1],
 135  link:RelNotes/1.8.1.txt[1.8.1].
 136
 137* link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
 138
 139* release notes for
 140  link:RelNotes/1.8.0.3.txt[1.8.0.3],
 141  link:RelNotes/1.8.0.2.txt[1.8.0.2],
 142  link:RelNotes/1.8.0.1.txt[1.8.0.1],
 143  link:RelNotes/1.8.0.txt[1.8.0].
 144
 145* link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
 146
 147* release notes for
 148  link:RelNotes/1.7.12.4.txt[1.7.12.4],
 149  link:RelNotes/1.7.12.3.txt[1.7.12.3],
 150  link:RelNotes/1.7.12.2.txt[1.7.12.2],
 151  link:RelNotes/1.7.12.1.txt[1.7.12.1],
 152  link:RelNotes/1.7.12.txt[1.7.12].
 153
 154* link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
 155
 156* release notes for
 157  link:RelNotes/1.7.11.7.txt[1.7.11.7],
 158  link:RelNotes/1.7.11.6.txt[1.7.11.6],
 159  link:RelNotes/1.7.11.5.txt[1.7.11.5],
 160  link:RelNotes/1.7.11.4.txt[1.7.11.4],
 161  link:RelNotes/1.7.11.3.txt[1.7.11.3],
 162  link:RelNotes/1.7.11.2.txt[1.7.11.2],
 163  link:RelNotes/1.7.11.1.txt[1.7.11.1],
 164  link:RelNotes/1.7.11.txt[1.7.11].
 165
 166* link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
 167
 168* release notes for
 169  link:RelNotes/1.7.10.5.txt[1.7.10.5],
 170  link:RelNotes/1.7.10.4.txt[1.7.10.4],
 171  link:RelNotes/1.7.10.3.txt[1.7.10.3],
 172  link:RelNotes/1.7.10.2.txt[1.7.10.2],
 173  link:RelNotes/1.7.10.1.txt[1.7.10.1],
 174  link:RelNotes/1.7.10.txt[1.7.10].
 175
 176* link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
 177
 178* release notes for
 179  link:RelNotes/1.7.9.7.txt[1.7.9.7],
 180  link:RelNotes/1.7.9.6.txt[1.7.9.6],
 181  link:RelNotes/1.7.9.5.txt[1.7.9.5],
 182  link:RelNotes/1.7.9.4.txt[1.7.9.4],
 183  link:RelNotes/1.7.9.3.txt[1.7.9.3],
 184  link:RelNotes/1.7.9.2.txt[1.7.9.2],
 185  link:RelNotes/1.7.9.1.txt[1.7.9.1],
 186  link:RelNotes/1.7.9.txt[1.7.9].
 187
 188* link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
 189
 190* release notes for
 191  link:RelNotes/1.7.8.6.txt[1.7.8.6],
 192  link:RelNotes/1.7.8.5.txt[1.7.8.5],
 193  link:RelNotes/1.7.8.4.txt[1.7.8.4],
 194  link:RelNotes/1.7.8.3.txt[1.7.8.3],
 195  link:RelNotes/1.7.8.2.txt[1.7.8.2],
 196  link:RelNotes/1.7.8.1.txt[1.7.8.1],
 197  link:RelNotes/1.7.8.txt[1.7.8].
 198
 199* link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
 200
 201* release notes for
 202  link:RelNotes/1.7.7.7.txt[1.7.7.7],
 203  link:RelNotes/1.7.7.6.txt[1.7.7.6],
 204  link:RelNotes/1.7.7.5.txt[1.7.7.5],
 205  link:RelNotes/1.7.7.4.txt[1.7.7.4],
 206  link:RelNotes/1.7.7.3.txt[1.7.7.3],
 207  link:RelNotes/1.7.7.2.txt[1.7.7.2],
 208  link:RelNotes/1.7.7.1.txt[1.7.7.1],
 209  link:RelNotes/1.7.7.txt[1.7.7].
 210
 211* link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
 212
 213* release notes for
 214  link:RelNotes/1.7.6.6.txt[1.7.6.6],
 215  link:RelNotes/1.7.6.5.txt[1.7.6.5],
 216  link:RelNotes/1.7.6.4.txt[1.7.6.4],
 217  link:RelNotes/1.7.6.3.txt[1.7.6.3],
 218  link:RelNotes/1.7.6.2.txt[1.7.6.2],
 219  link:RelNotes/1.7.6.1.txt[1.7.6.1],
 220  link:RelNotes/1.7.6.txt[1.7.6].
 221
 222* link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
 223
 224* release notes for
 225  link:RelNotes/1.7.5.4.txt[1.7.5.4],
 226  link:RelNotes/1.7.5.3.txt[1.7.5.3],
 227  link:RelNotes/1.7.5.2.txt[1.7.5.2],
 228  link:RelNotes/1.7.5.1.txt[1.7.5.1],
 229  link:RelNotes/1.7.5.txt[1.7.5].
 230
 231* link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
 232
 233* release notes for
 234  link:RelNotes/1.7.4.5.txt[1.7.4.5],
 235  link:RelNotes/1.7.4.4.txt[1.7.4.4],
 236  link:RelNotes/1.7.4.3.txt[1.7.4.3],
 237  link:RelNotes/1.7.4.2.txt[1.7.4.2],
 238  link:RelNotes/1.7.4.1.txt[1.7.4.1],
 239  link:RelNotes/1.7.4.txt[1.7.4].
 240
 241* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
 242
 243* release notes for
 244  link:RelNotes/1.7.3.5.txt[1.7.3.5],
 245  link:RelNotes/1.7.3.4.txt[1.7.3.4],
 246  link:RelNotes/1.7.3.3.txt[1.7.3.3],
 247  link:RelNotes/1.7.3.2.txt[1.7.3.2],
 248  link:RelNotes/1.7.3.1.txt[1.7.3.1],
 249  link:RelNotes/1.7.3.txt[1.7.3].
 250
 251* link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
 252
 253* release notes for
 254  link:RelNotes/1.7.2.5.txt[1.7.2.5],
 255  link:RelNotes/1.7.2.4.txt[1.7.2.4],
 256  link:RelNotes/1.7.2.3.txt[1.7.2.3],
 257  link:RelNotes/1.7.2.2.txt[1.7.2.2],
 258  link:RelNotes/1.7.2.1.txt[1.7.2.1],
 259  link:RelNotes/1.7.2.txt[1.7.2].
 260
 261* link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
 262
 263* release notes for
 264  link:RelNotes/1.7.1.4.txt[1.7.1.4],
 265  link:RelNotes/1.7.1.3.txt[1.7.1.3],
 266  link:RelNotes/1.7.1.2.txt[1.7.1.2],
 267  link:RelNotes/1.7.1.1.txt[1.7.1.1],
 268  link:RelNotes/1.7.1.txt[1.7.1].
 269
 270* link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
 271
 272* release notes for
 273  link:RelNotes/1.7.0.9.txt[1.7.0.9],
 274  link:RelNotes/1.7.0.8.txt[1.7.0.8],
 275  link:RelNotes/1.7.0.7.txt[1.7.0.7],
 276  link:RelNotes/1.7.0.6.txt[1.7.0.6],
 277  link:RelNotes/1.7.0.5.txt[1.7.0.5],
 278  link:RelNotes/1.7.0.4.txt[1.7.0.4],
 279  link:RelNotes/1.7.0.3.txt[1.7.0.3],
 280  link:RelNotes/1.7.0.2.txt[1.7.0.2],
 281  link:RelNotes/1.7.0.1.txt[1.7.0.1],
 282  link:RelNotes/1.7.0.txt[1.7.0].
 283
 284* link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
 285
 286* release notes for
 287  link:RelNotes/1.6.6.3.txt[1.6.6.3],
 288  link:RelNotes/1.6.6.2.txt[1.6.6.2],
 289  link:RelNotes/1.6.6.1.txt[1.6.6.1],
 290  link:RelNotes/1.6.6.txt[1.6.6].
 291
 292* link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
 293
 294* release notes for
 295  link:RelNotes/1.6.5.9.txt[1.6.5.9],
 296  link:RelNotes/1.6.5.8.txt[1.6.5.8],
 297  link:RelNotes/1.6.5.7.txt[1.6.5.7],
 298  link:RelNotes/1.6.5.6.txt[1.6.5.6],
 299  link:RelNotes/1.6.5.5.txt[1.6.5.5],
 300  link:RelNotes/1.6.5.4.txt[1.6.5.4],
 301  link:RelNotes/1.6.5.3.txt[1.6.5.3],
 302  link:RelNotes/1.6.5.2.txt[1.6.5.2],
 303  link:RelNotes/1.6.5.1.txt[1.6.5.1],
 304  link:RelNotes/1.6.5.txt[1.6.5].
 305
 306* link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
 307
 308* release notes for
 309  link:RelNotes/1.6.4.5.txt[1.6.4.5],
 310  link:RelNotes/1.6.4.4.txt[1.6.4.4],
 311  link:RelNotes/1.6.4.3.txt[1.6.4.3],
 312  link:RelNotes/1.6.4.2.txt[1.6.4.2],
 313  link:RelNotes/1.6.4.1.txt[1.6.4.1],
 314  link:RelNotes/1.6.4.txt[1.6.4].
 315
 316* link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
 317
 318* release notes for
 319  link:RelNotes/1.6.3.4.txt[1.6.3.4],
 320  link:RelNotes/1.6.3.3.txt[1.6.3.3],
 321  link:RelNotes/1.6.3.2.txt[1.6.3.2],
 322  link:RelNotes/1.6.3.1.txt[1.6.3.1],
 323  link:RelNotes/1.6.3.txt[1.6.3].
 324
 325* release notes for
 326  link:RelNotes/1.6.2.5.txt[1.6.2.5],
 327  link:RelNotes/1.6.2.4.txt[1.6.2.4],
 328  link:RelNotes/1.6.2.3.txt[1.6.2.3],
 329  link:RelNotes/1.6.2.2.txt[1.6.2.2],
 330  link:RelNotes/1.6.2.1.txt[1.6.2.1],
 331  link:RelNotes/1.6.2.txt[1.6.2].
 332
 333* link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
 334
 335* release notes for
 336  link:RelNotes/1.6.1.3.txt[1.6.1.3],
 337  link:RelNotes/1.6.1.2.txt[1.6.1.2],
 338  link:RelNotes/1.6.1.1.txt[1.6.1.1],
 339  link:RelNotes/1.6.1.txt[1.6.1].
 340
 341* link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
 342
 343* release notes for
 344  link:RelNotes/1.6.0.6.txt[1.6.0.6],
 345  link:RelNotes/1.6.0.5.txt[1.6.0.5],
 346  link:RelNotes/1.6.0.4.txt[1.6.0.4],
 347  link:RelNotes/1.6.0.3.txt[1.6.0.3],
 348  link:RelNotes/1.6.0.2.txt[1.6.0.2],
 349  link:RelNotes/1.6.0.1.txt[1.6.0.1],
 350  link:RelNotes/1.6.0.txt[1.6.0].
 351
 352* link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
 353
 354* release notes for
 355  link:RelNotes/1.5.6.6.txt[1.5.6.6],
 356  link:RelNotes/1.5.6.5.txt[1.5.6.5],
 357  link:RelNotes/1.5.6.4.txt[1.5.6.4],
 358  link:RelNotes/1.5.6.3.txt[1.5.6.3],
 359  link:RelNotes/1.5.6.2.txt[1.5.6.2],
 360  link:RelNotes/1.5.6.1.txt[1.5.6.1],
 361  link:RelNotes/1.5.6.txt[1.5.6].
 362
 363* link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
 364
 365* release notes for
 366  link:RelNotes/1.5.5.6.txt[1.5.5.6],
 367  link:RelNotes/1.5.5.5.txt[1.5.5.5],
 368  link:RelNotes/1.5.5.4.txt[1.5.5.4],
 369  link:RelNotes/1.5.5.3.txt[1.5.5.3],
 370  link:RelNotes/1.5.5.2.txt[1.5.5.2],
 371  link:RelNotes/1.5.5.1.txt[1.5.5.1],
 372  link:RelNotes/1.5.5.txt[1.5.5].
 373
 374* link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
 375
 376* release notes for
 377  link:RelNotes/1.5.4.7.txt[1.5.4.7],
 378  link:RelNotes/1.5.4.6.txt[1.5.4.6],
 379  link:RelNotes/1.5.4.5.txt[1.5.4.5],
 380  link:RelNotes/1.5.4.4.txt[1.5.4.4],
 381  link:RelNotes/1.5.4.3.txt[1.5.4.3],
 382  link:RelNotes/1.5.4.2.txt[1.5.4.2],
 383  link:RelNotes/1.5.4.1.txt[1.5.4.1],
 384  link:RelNotes/1.5.4.txt[1.5.4].
 385
 386* link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
 387
 388* release notes for
 389  link:RelNotes/1.5.3.8.txt[1.5.3.8],
 390  link:RelNotes/1.5.3.7.txt[1.5.3.7],
 391  link:RelNotes/1.5.3.6.txt[1.5.3.6],
 392  link:RelNotes/1.5.3.5.txt[1.5.3.5],
 393  link:RelNotes/1.5.3.4.txt[1.5.3.4],
 394  link:RelNotes/1.5.3.3.txt[1.5.3.3],
 395  link:RelNotes/1.5.3.2.txt[1.5.3.2],
 396  link:RelNotes/1.5.3.1.txt[1.5.3.1],
 397  link:RelNotes/1.5.3.txt[1.5.3].
 398
 399* link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
 400
 401* release notes for
 402  link:RelNotes/1.5.2.5.txt[1.5.2.5],
 403  link:RelNotes/1.5.2.4.txt[1.5.2.4],
 404  link:RelNotes/1.5.2.3.txt[1.5.2.3],
 405  link:RelNotes/1.5.2.2.txt[1.5.2.2],
 406  link:RelNotes/1.5.2.1.txt[1.5.2.1],
 407  link:RelNotes/1.5.2.txt[1.5.2].
 408
 409* link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
 410
 411* release notes for
 412  link:RelNotes/1.5.1.6.txt[1.5.1.6],
 413  link:RelNotes/1.5.1.5.txt[1.5.1.5],
 414  link:RelNotes/1.5.1.4.txt[1.5.1.4],
 415  link:RelNotes/1.5.1.3.txt[1.5.1.3],
 416  link:RelNotes/1.5.1.2.txt[1.5.1.2],
 417  link:RelNotes/1.5.1.1.txt[1.5.1.1],
 418  link:RelNotes/1.5.1.txt[1.5.1].
 419
 420* link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
 421
 422* release notes for
 423  link:RelNotes/1.5.0.7.txt[1.5.0.7],
 424  link:RelNotes/1.5.0.6.txt[1.5.0.6],
 425  link:RelNotes/1.5.0.5.txt[1.5.0.5],
 426  link:RelNotes/1.5.0.3.txt[1.5.0.3],
 427  link:RelNotes/1.5.0.2.txt[1.5.0.2],
 428  link:RelNotes/1.5.0.1.txt[1.5.0.1],
 429  link:RelNotes/1.5.0.txt[1.5.0].
 430
 431* documentation for release link:v1.4.4.4/git.html[1.4.4.4],
 432  link:v1.3.3/git.html[1.3.3],
 433  link:v1.2.6/git.html[1.2.6],
 434  link:v1.0.13/git.html[1.0.13].
 435
 436============
 437
 438endif::stalenotes[]
 439
 440OPTIONS
 441-------
 442--version::
 443        Prints the Git suite version that the 'git' program came from.
 444
 445--help::
 446        Prints the synopsis and a list of the most commonly used
 447        commands. If the option '--all' or '-a' is given then all
 448        available commands are printed. If a Git command is named this
 449        option will bring up the manual page for that command.
 450+
 451Other options are available to control how the manual page is
 452displayed. See linkgit:git-help[1] for more information,
 453because `git --help ...` is converted internally into `git
 454help ...`.
 455
 456-C <path>::
 457        Run as if git was started in '<path>' instead of the current working
 458        directory.  When multiple `-C` options are given, each subsequent
 459        non-absolute `-C <path>` is interpreted relative to the preceding `-C
 460        <path>`.
 461+
 462This option affects options that expect path name like `--git-dir` and
 463`--work-tree` in that their interpretations of the path names would be
 464made relative to the working directory caused by the `-C` option. For
 465example the following invocations are equivalent:
 466
 467    git --git-dir=a.git --work-tree=b -C c status
 468    git --git-dir=c/a.git --work-tree=c/b status
 469
 470-c <name>=<value>::
 471        Pass a configuration parameter to the command. The value
 472        given will override values from configuration files.
 473        The <name> is expected in the same format as listed by
 474        'git config' (subkeys separated by dots).
 475+
 476Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
 477`foo.bar` to the boolean true value (just like `[foo]bar` would in a
 478config file). Including the equals but with an empty value (like `git -c
 479foo.bar= ...`) sets `foo.bar` to the empty string.
 480
 481--exec-path[=<path>]::
 482        Path to wherever your core Git programs are installed.
 483        This can also be controlled by setting the GIT_EXEC_PATH
 484        environment variable. If no path is given, 'git' will print
 485        the current setting and then exit.
 486
 487--html-path::
 488        Print the path, without trailing slash, where Git's HTML
 489        documentation is installed and exit.
 490
 491--man-path::
 492        Print the manpath (see `man(1)`) for the man pages for
 493        this version of Git and exit.
 494
 495--info-path::
 496        Print the path where the Info files documenting this
 497        version of Git are installed and exit.
 498
 499-p::
 500--paginate::
 501        Pipe all output into 'less' (or if set, $PAGER) if standard
 502        output is a terminal.  This overrides the `pager.<cmd>`
 503        configuration options (see the "Configuration Mechanism" section
 504        below).
 505
 506--no-pager::
 507        Do not pipe Git output into a pager.
 508
 509--git-dir=<path>::
 510        Set the path to the repository. This can also be controlled by
 511        setting the GIT_DIR environment variable. It can be an absolute
 512        path or relative path to current working directory.
 513
 514--work-tree=<path>::
 515        Set the path to the working tree. It can be an absolute path
 516        or a path relative to the current working directory.
 517        This can also be controlled by setting the GIT_WORK_TREE
 518        environment variable and the core.worktree configuration
 519        variable (see core.worktree in linkgit:git-config[1] for a
 520        more detailed discussion).
 521
 522--namespace=<path>::
 523        Set the Git namespace.  See linkgit:gitnamespaces[7] for more
 524        details.  Equivalent to setting the `GIT_NAMESPACE` environment
 525        variable.
 526
 527--bare::
 528        Treat the repository as a bare repository.  If GIT_DIR
 529        environment is not set, it is set to the current working
 530        directory.
 531
 532--no-replace-objects::
 533        Do not use replacement refs to replace Git objects. See
 534        linkgit:git-replace[1] for more information.
 535
 536--literal-pathspecs::
 537        Treat pathspecs literally (i.e. no globbing, no pathspec magic).
 538        This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
 539        variable to `1`.
 540
 541--glob-pathspecs::
 542        Add "glob" magic to all pathspec. This is equivalent to setting
 543        the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
 544        globbing on individual pathspecs can be done using pathspec
 545        magic ":(literal)"
 546
 547--noglob-pathspecs::
 548        Add "literal" magic to all pathspec. This is equivalent to setting
 549        the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
 550        globbing on individual pathspecs can be done using pathspec
 551        magic ":(glob)"
 552
 553--icase-pathspecs::
 554        Add "icase" magic to all pathspec. This is equivalent to setting
 555        the `GIT_ICASE_PATHSPECS` environment variable to `1`.
 556
 557GIT COMMANDS
 558------------
 559
 560We divide Git into high level ("porcelain") commands and low level
 561("plumbing") commands.
 562
 563High-level commands (porcelain)
 564-------------------------------
 565
 566We separate the porcelain commands into the main commands and some
 567ancillary user utilities.
 568
 569Main porcelain commands
 570~~~~~~~~~~~~~~~~~~~~~~~
 571
 572include::cmds-mainporcelain.txt[]
 573
 574Ancillary Commands
 575~~~~~~~~~~~~~~~~~~
 576Manipulators:
 577
 578include::cmds-ancillarymanipulators.txt[]
 579
 580Interrogators:
 581
 582include::cmds-ancillaryinterrogators.txt[]
 583
 584
 585Interacting with Others
 586~~~~~~~~~~~~~~~~~~~~~~~
 587
 588These commands are to interact with foreign SCM and with other
 589people via patch over e-mail.
 590
 591include::cmds-foreignscminterface.txt[]
 592
 593
 594Low-level commands (plumbing)
 595-----------------------------
 596
 597Although Git includes its
 598own porcelain layer, its low-level commands are sufficient to support
 599development of alternative porcelains.  Developers of such porcelains
 600might start by reading about linkgit:git-update-index[1] and
 601linkgit:git-read-tree[1].
 602
 603The interface (input, output, set of options and the semantics)
 604to these low-level commands are meant to be a lot more stable
 605than Porcelain level commands, because these commands are
 606primarily for scripted use.  The interface to Porcelain commands
 607on the other hand are subject to change in order to improve the
 608end user experience.
 609
 610The following description divides
 611the low-level commands into commands that manipulate objects (in
 612the repository, index, and working tree), commands that interrogate and
 613compare objects, and commands that move objects and references between
 614repositories.
 615
 616
 617Manipulation commands
 618~~~~~~~~~~~~~~~~~~~~~
 619
 620include::cmds-plumbingmanipulators.txt[]
 621
 622
 623Interrogation commands
 624~~~~~~~~~~~~~~~~~~~~~~
 625
 626include::cmds-plumbinginterrogators.txt[]
 627
 628In general, the interrogate commands do not touch the files in
 629the working tree.
 630
 631
 632Synching repositories
 633~~~~~~~~~~~~~~~~~~~~~
 634
 635include::cmds-synchingrepositories.txt[]
 636
 637The following are helper commands used by the above; end users
 638typically do not use them directly.
 639
 640include::cmds-synchelpers.txt[]
 641
 642
 643Internal helper commands
 644~~~~~~~~~~~~~~~~~~~~~~~~
 645
 646These are internal helper commands used by other commands; end
 647users typically do not use them directly.
 648
 649include::cmds-purehelpers.txt[]
 650
 651
 652Configuration Mechanism
 653-----------------------
 654
 655Git uses a simple text format to store customizations that are per
 656repository and are per user.  Such a configuration file may look
 657like this:
 658
 659------------
 660#
 661# A '#' or ';' character indicates a comment.
 662#
 663
 664; core variables
 665[core]
 666        ; Don't trust file modes
 667        filemode = false
 668
 669; user identity
 670[user]
 671        name = "Junio C Hamano"
 672        email = "gitster@pobox.com"
 673
 674------------
 675
 676Various commands read from the configuration file and adjust
 677their operation accordingly.  See linkgit:git-config[1] for a
 678list and more details about the configuration mechanism.
 679
 680
 681Identifier Terminology
 682----------------------
 683<object>::
 684        Indicates the object name for any type of object.
 685
 686<blob>::
 687        Indicates a blob object name.
 688
 689<tree>::
 690        Indicates a tree object name.
 691
 692<commit>::
 693        Indicates a commit object name.
 694
 695<tree-ish>::
 696        Indicates a tree, commit or tag object name.  A
 697        command that takes a <tree-ish> argument ultimately wants to
 698        operate on a <tree> object but automatically dereferences
 699        <commit> and <tag> objects that point at a <tree>.
 700
 701<commit-ish>::
 702        Indicates a commit or tag object name.  A
 703        command that takes a <commit-ish> argument ultimately wants to
 704        operate on a <commit> object but automatically dereferences
 705        <tag> objects that point at a <commit>.
 706
 707<type>::
 708        Indicates that an object type is required.
 709        Currently one of: `blob`, `tree`, `commit`, or `tag`.
 710
 711<file>::
 712        Indicates a filename - almost always relative to the
 713        root of the tree structure `GIT_INDEX_FILE` describes.
 714
 715Symbolic Identifiers
 716--------------------
 717Any Git command accepting any <object> can also use the following
 718symbolic notation:
 719
 720HEAD::
 721        indicates the head of the current branch.
 722
 723<tag>::
 724        a valid tag 'name'
 725        (i.e. a `refs/tags/<tag>` reference).
 726
 727<head>::
 728        a valid head 'name'
 729        (i.e. a `refs/heads/<head>` reference).
 730
 731For a more complete list of ways to spell object names, see
 732"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
 733
 734
 735File/Directory Structure
 736------------------------
 737
 738Please see the linkgit:gitrepository-layout[5] document.
 739
 740Read linkgit:githooks[5] for more details about each hook.
 741
 742Higher level SCMs may provide and manage additional information in the
 743`$GIT_DIR`.
 744
 745
 746Terminology
 747-----------
 748Please see linkgit:gitglossary[7].
 749
 750
 751Environment Variables
 752---------------------
 753Various Git commands use the following environment variables:
 754
 755The Git Repository
 756~~~~~~~~~~~~~~~~~~
 757These environment variables apply to 'all' core Git commands. Nb: it
 758is worth noting that they may be used/overridden by SCMS sitting above
 759Git so take care if using Cogito etc.
 760
 761'GIT_INDEX_FILE'::
 762        This environment allows the specification of an alternate
 763        index file. If not specified, the default of `$GIT_DIR/index`
 764        is used.
 765
 766'GIT_INDEX_VERSION'::
 767        This environment variable allows the specification of an index
 768        version for new repositories.  It won't affect existing index
 769        files.  By default index file version [23] is used.
 770
 771'GIT_OBJECT_DIRECTORY'::
 772        If the object storage directory is specified via this
 773        environment variable then the sha1 directories are created
 774        underneath - otherwise the default `$GIT_DIR/objects`
 775        directory is used.
 776
 777'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
 778        Due to the immutable nature of Git objects, old objects can be
 779        archived into shared, read-only directories. This variable
 780        specifies a ":" separated (on Windows ";" separated) list
 781        of Git object directories which can be used to search for Git
 782        objects. New objects will not be written to these directories.
 783
 784'GIT_DIR'::
 785        If the 'GIT_DIR' environment variable is set then it
 786        specifies a path to use instead of the default `.git`
 787        for the base of the repository.
 788        The '--git-dir' command-line option also sets this value.
 789
 790'GIT_WORK_TREE'::
 791        Set the path to the root of the working tree.
 792        This can also be controlled by the '--work-tree' command-line
 793        option and the core.worktree configuration variable.
 794
 795'GIT_NAMESPACE'::
 796        Set the Git namespace; see linkgit:gitnamespaces[7] for details.
 797        The '--namespace' command-line option also sets this value.
 798
 799'GIT_CEILING_DIRECTORIES'::
 800        This should be a colon-separated list of absolute paths.  If
 801        set, it is a list of directories that Git should not chdir up
 802        into while looking for a repository directory (useful for
 803        excluding slow-loading network directories).  It will not
 804        exclude the current working directory or a GIT_DIR set on the
 805        command line or in the environment.  Normally, Git has to read
 806        the entries in this list and resolve any symlink that
 807        might be present in order to compare them with the current
 808        directory.  However, if even this access is slow, you
 809        can add an empty entry to the list to tell Git that the
 810        subsequent entries are not symlinks and needn't be resolved;
 811        e.g.,
 812        'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
 813
 814'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
 815        When run in a directory that does not have ".git" repository
 816        directory, Git tries to find such a directory in the parent
 817        directories to find the top of the working tree, but by default it
 818        does not cross filesystem boundaries.  This environment variable
 819        can be set to true to tell Git not to stop at filesystem
 820        boundaries.  Like 'GIT_CEILING_DIRECTORIES', this will not affect
 821        an explicit repository directory set via 'GIT_DIR' or on the
 822        command line.
 823
 824Git Commits
 825~~~~~~~~~~~
 826'GIT_AUTHOR_NAME'::
 827'GIT_AUTHOR_EMAIL'::
 828'GIT_AUTHOR_DATE'::
 829'GIT_COMMITTER_NAME'::
 830'GIT_COMMITTER_EMAIL'::
 831'GIT_COMMITTER_DATE'::
 832'EMAIL'::
 833        see linkgit:git-commit-tree[1]
 834
 835Git Diffs
 836~~~~~~~~~
 837'GIT_DIFF_OPTS'::
 838        Only valid setting is "--unified=??" or "-u??" to set the
 839        number of context lines shown when a unified diff is created.
 840        This takes precedence over any "-U" or "--unified" option
 841        value passed on the Git diff command line.
 842
 843'GIT_EXTERNAL_DIFF'::
 844        When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
 845        program named by it is called, instead of the diff invocation
 846        described above.  For a path that is added, removed, or modified,
 847        'GIT_EXTERNAL_DIFF' is called with 7 parameters:
 848
 849        path old-file old-hex old-mode new-file new-hex new-mode
 850+
 851where:
 852
 853        <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
 854                         contents of <old|new>,
 855        <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
 856        <old|new>-mode:: are the octal representation of the file modes.
 857+
 858The file parameters can point at the user's working file
 859(e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
 860when a new file is added), or a temporary file (e.g. `old-file` in the
 861index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the
 862temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
 863+
 864For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
 865parameter, <path>.
 866+
 867For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
 868'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
 869
 870'GIT_DIFF_PATH_COUNTER'::
 871        A 1-based counter incremented by one for every path.
 872
 873'GIT_DIFF_PATH_TOTAL'::
 874        The total number of paths.
 875
 876other
 877~~~~~
 878'GIT_MERGE_VERBOSITY'::
 879        A number controlling the amount of output shown by
 880        the recursive merge strategy.  Overrides merge.verbosity.
 881        See linkgit:git-merge[1]
 882
 883'GIT_PAGER'::
 884        This environment variable overrides `$PAGER`. If it is set
 885        to an empty string or to the value "cat", Git will not launch
 886        a pager.  See also the `core.pager` option in
 887        linkgit:git-config[1].
 888
 889'GIT_EDITOR'::
 890        This environment variable overrides `$EDITOR` and `$VISUAL`.
 891        It is used by several Git commands when, on interactive mode,
 892        an editor is to be launched. See also linkgit:git-var[1]
 893        and the `core.editor` option in linkgit:git-config[1].
 894
 895'GIT_SSH'::
 896'GIT_SSH_COMMAND'::
 897        If either of these environment variables is set then 'git fetch'
 898        and 'git push' will use the specified command instead of 'ssh'
 899        when they need to connect to a remote system.
 900        The command will be given exactly two or four arguments: the
 901        'username@host' (or just 'host') from the URL and the shell
 902        command to execute on that remote system, optionally preceded by
 903        '-p' (literally) and the 'port' from the URL when it specifies
 904        something other than the default SSH port.
 905+
 906`$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
 907by the shell, which allows additional arguments to be included.
 908`$GIT_SSH` on the other hand must be just the path to a program
 909(which can be a wrapper shell script, if additional arguments are
 910needed).
 911+
 912Usually it is easier to configure any desired options through your
 913personal `.ssh/config` file.  Please consult your ssh documentation
 914for further details.
 915
 916'GIT_ASKPASS'::
 917        If this environment variable is set, then Git commands which need to
 918        acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
 919        will call this program with a suitable prompt as command-line argument
 920        and read the password from its STDOUT. See also the 'core.askpass'
 921        option in linkgit:git-config[1].
 922
 923'GIT_TERMINAL_PROMPT'::
 924        If this environment variable is set to `0`, git will not prompt
 925        on the terminal (e.g., when asking for HTTP authentication).
 926
 927'GIT_CONFIG_NOSYSTEM'::
 928        Whether to skip reading settings from the system-wide
 929        `$(prefix)/etc/gitconfig` file.  This environment variable can
 930        be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
 931        predictable environment for a picky script, or you can set it
 932        temporarily to avoid using a buggy `/etc/gitconfig` file while
 933        waiting for someone with sufficient permissions to fix it.
 934
 935'GIT_FLUSH'::
 936        If this environment variable is set to "1", then commands such
 937        as 'git blame' (in incremental mode), 'git rev-list', 'git log',
 938        'git check-attr' and 'git check-ignore' will
 939        force a flush of the output stream after each record have been
 940        flushed. If this
 941        variable is set to "0", the output of these commands will be done
 942        using completely buffered I/O.   If this environment variable is
 943        not set, Git will choose buffered or record-oriented flushing
 944        based on whether stdout appears to be redirected to a file or not.
 945
 946'GIT_TRACE'::
 947        Enables general trace messages, e.g. alias expansion, built-in
 948        command execution and external command execution.
 949+
 950If this variable is set to "1", "2" or "true" (comparison
 951is case insensitive), trace messages will be printed to
 952stderr.
 953+
 954If the variable is set to an integer value greater than 2
 955and lower than 10 (strictly) then Git will interpret this
 956value as an open file descriptor and will try to write the
 957trace messages into this file descriptor.
 958+
 959Alternatively, if the variable is set to an absolute path
 960(starting with a '/' character), Git will interpret this
 961as a file path and will try to write the trace messages
 962into it.
 963+
 964Unsetting the variable, or setting it to empty, "0" or
 965"false" (case insensitive) disables trace messages.
 966
 967'GIT_TRACE_PACK_ACCESS'::
 968        Enables trace messages for all accesses to any packs. For each
 969        access, the pack file name and an offset in the pack is
 970        recorded. This may be helpful for troubleshooting some
 971        pack-related performance problems.
 972        See 'GIT_TRACE' for available trace output options.
 973
 974'GIT_TRACE_PACKET'::
 975        Enables trace messages for all packets coming in or out of a
 976        given program. This can help with debugging object negotiation
 977        or other protocol issues. Tracing is turned off at a packet
 978        starting with "PACK".
 979        See 'GIT_TRACE' for available trace output options.
 980
 981'GIT_TRACE_PERFORMANCE'::
 982        Enables performance related trace messages, e.g. total execution
 983        time of each Git command.
 984        See 'GIT_TRACE' for available trace output options.
 985
 986'GIT_TRACE_SETUP'::
 987        Enables trace messages printing the .git, working tree and current
 988        working directory after Git has completed its setup phase.
 989        See 'GIT_TRACE' for available trace output options.
 990
 991'GIT_TRACE_SHALLOW'::
 992        Enables trace messages that can help debugging fetching /
 993        cloning of shallow repositories.
 994        See 'GIT_TRACE' for available trace output options.
 995
 996GIT_LITERAL_PATHSPECS::
 997        Setting this variable to `1` will cause Git to treat all
 998        pathspecs literally, rather than as glob patterns. For example,
 999        running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
1000        for commits that touch the path `*.c`, not any paths that the
1001        glob `*.c` matches. You might want this if you are feeding
1002        literal paths to Git (e.g., paths previously given to you by
1003        `git ls-tree`, `--raw` diff output, etc).
1004
1005GIT_GLOB_PATHSPECS::
1006        Setting this variable to `1` will cause Git to treat all
1007        pathspecs as glob patterns (aka "glob" magic).
1008
1009GIT_NOGLOB_PATHSPECS::
1010        Setting this variable to `1` will cause Git to treat all
1011        pathspecs as literal (aka "literal" magic).
1012
1013GIT_ICASE_PATHSPECS::
1014        Setting this variable to `1` will cause Git to treat all
1015        pathspecs as case-insensitive.
1016
1017'GIT_REFLOG_ACTION'::
1018        When a ref is updated, reflog entries are created to keep
1019        track of the reason why the ref was updated (which is
1020        typically the name of the high-level command that updated
1021        the ref), in addition to the old and new values of the ref.
1022        A scripted Porcelain command can use set_reflog_action
1023        helper function in `git-sh-setup` to set its name to this
1024        variable when it is invoked as the top level command by the
1025        end user, to be recorded in the body of the reflog.
1026
1027
1028Discussion[[Discussion]]
1029------------------------
1030
1031More detail on the following is available from the
1032link:user-manual.html#git-concepts[Git concepts chapter of the
1033user-manual] and linkgit:gitcore-tutorial[7].
1034
1035A Git project normally consists of a working directory with a ".git"
1036subdirectory at the top level.  The .git directory contains, among other
1037things, a compressed object database representing the complete history
1038of the project, an "index" file which links that history to the current
1039contents of the working tree, and named pointers into that history such
1040as tags and branch heads.
1041
1042The object database contains objects of three main types: blobs, which
1043hold file data; trees, which point to blobs and other trees to build up
1044directory hierarchies; and commits, which each reference a single tree
1045and some number of parent commits.
1046
1047The commit, equivalent to what other systems call a "changeset" or
1048"version", represents a step in the project's history, and each parent
1049represents an immediately preceding step.  Commits with more than one
1050parent represent merges of independent lines of development.
1051
1052All objects are named by the SHA-1 hash of their contents, normally
1053written as a string of 40 hex digits.  Such names are globally unique.
1054The entire history leading up to a commit can be vouched for by signing
1055just that commit.  A fourth object type, the tag, is provided for this
1056purpose.
1057
1058When first created, objects are stored in individual files, but for
1059efficiency may later be compressed together into "pack files".
1060
1061Named pointers called refs mark interesting points in history.  A ref
1062may contain the SHA-1 name of an object or the name of another ref.  Refs
1063with names beginning `ref/head/` contain the SHA-1 name of the most
1064recent commit (or "head") of a branch under development.  SHA-1 names of
1065tags of interest are stored under `ref/tags/`.  A special ref named
1066`HEAD` contains the name of the currently checked-out branch.
1067
1068The index file is initialized with a list of all paths and, for each
1069path, a blob object and a set of attributes.  The blob object represents
1070the contents of the file as of the head of the current branch.  The
1071attributes (last modified time, size, etc.) are taken from the
1072corresponding file in the working tree.  Subsequent changes to the
1073working tree can be found by comparing these attributes.  The index may
1074be updated with new content, and new commits may be created from the
1075content stored in the index.
1076
1077The index is also capable of storing multiple entries (called "stages")
1078for a given pathname.  These stages are used to hold the various
1079unmerged version of a file when a merge is in progress.
1080
1081FURTHER DOCUMENTATION
1082---------------------
1083
1084See the references in the "description" section to get started
1085using Git.  The following is probably more detail than necessary
1086for a first-time user.
1087
1088The link:user-manual.html#git-concepts[Git concepts chapter of the
1089user-manual] and linkgit:gitcore-tutorial[7] both provide
1090introductions to the underlying Git architecture.
1091
1092See linkgit:gitworkflows[7] for an overview of recommended workflows.
1093
1094See also the link:howto-index.html[howto] documents for some useful
1095examples.
1096
1097The internals are documented in the
1098link:technical/api-index.html[Git API documentation].
1099
1100Users migrating from CVS may also want to
1101read linkgit:gitcvs-migration[7].
1102
1103
1104Authors
1105-------
1106Git was started by Linus Torvalds, and is currently maintained by Junio
1107C Hamano. Numerous contributions have come from the Git mailing list
1108<git@vger.kernel.org>.  http://www.openhub.net/p/git/contributors/summary
1109gives you a more complete list of contributors.
1110
1111If you have a clone of git.git itself, the
1112output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1113the authors for specific parts of the project.
1114
1115Reporting Bugs
1116--------------
1117
1118Report bugs to the Git mailing list <git@vger.kernel.org> where the
1119development and maintenance is primarily done.  You do not have to be
1120subscribed to the list to send a message there.
1121
1122SEE ALSO
1123--------
1124linkgit:gittutorial[7], linkgit:gittutorial-2[7],
1125linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
1126linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
1127linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1128linkgit:gitworkflows[7]
1129
1130GIT
1131---
1132Part of the linkgit:git[1] suite