logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

git.1 (65795B)


  1. '\" t
  2. .\" Title: git
  3. .\" Author: [see the "Authors" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
  5. .\" Date: 2025-03-14
  6. .\" Manual: Git Manual
  7. .\" Source: Git 2.49.0
  8. .\" Language: English
  9. .\"
  10. .TH "GIT" "1" "2025-03-14" "Git 2\&.49\&.0" "Git Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git \- the stupid content tracker
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit\fR [\-v | \-\-version] [\-h | \-\-help] [\-C <path>] [\-c <name>=<value>]
  36. [\-\-exec\-path[=<path>]] [\-\-html\-path] [\-\-man\-path] [\-\-info\-path]
  37. [\-p | \-\-paginate | \-P | \-\-no\-pager] [\-\-no\-replace\-objects] [\-\-no\-lazy\-fetch]
  38. [\-\-no\-optional\-locks] [\-\-no\-advice] [\-\-bare] [\-\-git\-dir=<path>]
  39. [\-\-work\-tree=<path>] [\-\-namespace=<name>] [\-\-config\-env=<name>=<envvar>]
  40. <command> [<args>]
  41. .fi
  42. .SH "DESCRIPTION"
  43. .sp
  44. Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high\-level operations and full access to internals\&.
  45. .sp
  46. See \fBgittutorial\fR(7) to get started, then see \fBgiteveryday\fR(7) for a useful minimum set of commands\&. The \m[blue]\fBGit User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2 has a more in\-depth introduction\&.
  47. .sp
  48. After you mastered the basic concepts, you can come back to this page to learn what commands Git offers\&. You can learn more about individual Git commands with "git help command"\&. \fBgitcli\fR(7) manual page gives you an overview of the command\-line command syntax\&.
  49. .sp
  50. A formatted and hyperlinked copy of the latest Git documentation can be viewed at \m[blue]\fBhttps://git\&.github\&.io/htmldocs/git\&.html\fR\m[] or \m[blue]\fBhttps://git\-scm\&.com/docs\fR\m[]\&.
  51. .SH "OPTIONS"
  52. .PP
  53. \-v, \-\-version
  54. .RS 4
  55. Prints the Git suite version that the
  56. \fIgit\fR
  57. program came from\&.
  58. .sp
  59. This option is internally converted to
  60. \fBgit\fR
  61. \fBversion\fR
  62. \&.\&.\&. and accepts the same options as the
  63. \fBgit-version\fR(1)
  64. command\&. If
  65. \fB\-\-help\fR
  66. is also given, it takes precedence over
  67. \fB\-\-version\fR\&.
  68. .RE
  69. .PP
  70. \-h, \-\-help
  71. .RS 4
  72. Prints the synopsis and a list of the most commonly used commands\&. If the option
  73. \fB\-\-all\fR
  74. or
  75. \fB\-a\fR
  76. 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\&.
  77. .sp
  78. Other options are available to control how the manual page is displayed\&. See
  79. \fBgit-help\fR(1)
  80. for more information, because
  81. \fBgit\fR
  82. \fB\-\-help\fR
  83. \&.\&.\&. is converted internally into
  84. \fBgit\fR
  85. \fBhelp\fR
  86. \&.\&.\&.\&.
  87. .RE
  88. .PP
  89. \-C <path>
  90. .RS 4
  91. Run as if git was started in
  92. \fI<path>\fR
  93. instead of the current working directory\&. When multiple
  94. \fB\-C\fR
  95. options are given, each subsequent non\-absolute
  96. \fB\-C\fR
  97. \fI<path>\fR
  98. is interpreted relative to the preceding
  99. \fB\-C\fR
  100. \fI<path>\fR\&. If
  101. \fI<path>\fR
  102. is present but empty, e\&.g\&.
  103. \fB\-C\fR
  104. "", then the current working directory is left unchanged\&.
  105. .sp
  106. This option affects options that expect path name like
  107. \fB\-\-git\-dir\fR
  108. and
  109. \fB\-\-work\-tree\fR
  110. in that their interpretations of the path names would be made relative to the working directory caused by the
  111. \fB\-C\fR
  112. option\&. For example the following invocations are equivalent:
  113. .sp
  114. .if n \{\
  115. .RS 4
  116. .\}
  117. .nf
  118. git \-\-git\-dir=a\&.git \-\-work\-tree=b \-C c status
  119. git \-\-git\-dir=c/a\&.git \-\-work\-tree=c/b status
  120. .fi
  121. .if n \{\
  122. .RE
  123. .\}
  124. .RE
  125. .PP
  126. \-c <name>=<value>
  127. .RS 4
  128. 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
  129. \fIgit config\fR
  130. (subkeys separated by dots)\&.
  131. .sp
  132. Note that omitting the
  133. \fB=\fR
  134. in
  135. \fBgit\fR
  136. \fB\-c\fR
  137. \fBfoo\&.bar\fR
  138. \&.\&.\&. is allowed and sets
  139. \fBfoo\&.bar\fR
  140. to the boolean true value (just like [\fBfoo\fR]\fBbar\fR
  141. would in a config file)\&. Including the equals but with an empty value (like
  142. \fBgit\fR
  143. \fB\-c\fR
  144. \fBfoo\&.bar=\fR
  145. \&.\&.\&.) sets
  146. \fBfoo\&.bar\fR
  147. to the empty string which
  148. \fBgit\fR
  149. \fBconfig\fR
  150. \fB\-\-type=bool\fR
  151. will convert to
  152. \fBfalse\fR\&.
  153. .RE
  154. .PP
  155. \-\-config\-env=<name>=<envvar>
  156. .RS 4
  157. Like
  158. \fB\-c\fR
  159. \fI<name>\fR\fB=\fR\fI<value>\fR, give configuration variable
  160. \fI<name>\fR
  161. a value, where <envvar> is the name of an environment variable from which to retrieve the value\&. Unlike
  162. \fB\-c\fR
  163. 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
  164. \fI<envvar>\fR
  165. does not exist in the environment\&.
  166. \fI<envvar>\fR
  167. may not contain an equals sign to avoid ambiguity with
  168. \fI<name>\fR
  169. containing one\&.
  170. .sp
  171. 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\&.
  172. \fB/proc/self/cmdline\fR), but not your environment (e\&.g\&.
  173. \fB/proc/self/environ\fR)\&. That behavior is the default on Linux, but may not be on your system\&.
  174. .sp
  175. Note that this might add security for variables such as
  176. \fBhttp\&.extraHeader\fR
  177. where the sensitive information is part of the value, but not e\&.g\&.
  178. \fBurl\&.\fR\fI<base>\fR\fB\&.insteadOf\fR
  179. where the sensitive information can be part of the key\&.
  180. .RE
  181. .PP
  182. \-\-exec\-path[=<path>]
  183. .RS 4
  184. Path to wherever your core Git programs are installed\&. This can also be controlled by setting the GIT_EXEC_PATH environment variable\&. If no path is given,
  185. \fIgit\fR
  186. will print the current setting and then exit\&.
  187. .RE
  188. .PP
  189. \-\-html\-path
  190. .RS 4
  191. Print the path, without trailing slash, where Git\(cqs HTML documentation is installed and exit\&.
  192. .RE
  193. .PP
  194. \-\-man\-path
  195. .RS 4
  196. Print the manpath (see
  197. \fBman\fR(\fB1\fR)) for the man pages for this version of Git and exit\&.
  198. .RE
  199. .PP
  200. \-\-info\-path
  201. .RS 4
  202. Print the path where the Info files documenting this version of Git are installed and exit\&.
  203. .RE
  204. .PP
  205. \-p, \-\-paginate
  206. .RS 4
  207. Pipe all output into
  208. \fIless\fR
  209. (or if set, $PAGER) if standard output is a terminal\&. This overrides the
  210. \fBpager\&.\fR\fI<cmd>\fR
  211. configuration options (see the "Configuration Mechanism" section below)\&.
  212. .RE
  213. .PP
  214. \-P, \-\-no\-pager
  215. .RS 4
  216. Do not pipe Git output into a pager\&.
  217. .RE
  218. .PP
  219. \-\-git\-dir=<path>
  220. .RS 4
  221. Set the path to the repository ("\&.git" directory)\&. This can also be controlled by setting the
  222. \fBGIT_DIR\fR
  223. environment variable\&. It can be an absolute path or relative path to current working directory\&.
  224. .sp
  225. Specifying the location of the "\&.git" directory using this option (or
  226. \fBGIT_DIR\fR
  227. 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
  228. \fB\-\-work\-tree=\fR\fI<path>\fR
  229. option (or
  230. \fBGIT_WORK_TREE\fR
  231. environment variable)
  232. .sp
  233. If you just want to run git as if it was started in
  234. \fI<path>\fR
  235. then use
  236. \fBgit\fR
  237. \fB\-C\fR
  238. \fI<path>\fR\&.
  239. .RE
  240. .PP
  241. \-\-work\-tree=<path>
  242. .RS 4
  243. 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 GIT_WORK_TREE environment variable and the core\&.worktree configuration variable (see core\&.worktree in
  244. \fBgit-config\fR(1)
  245. for a more detailed discussion)\&.
  246. .RE
  247. .PP
  248. \-\-namespace=<path>
  249. .RS 4
  250. Set the Git namespace\&. See
  251. \fBgitnamespaces\fR(7)
  252. for more details\&. Equivalent to setting the
  253. \fBGIT_NAMESPACE\fR
  254. environment variable\&.
  255. .RE
  256. .PP
  257. \-\-bare
  258. .RS 4
  259. Treat the repository as a bare repository\&. If GIT_DIR environment is not set, it is set to the current working directory\&.
  260. .RE
  261. .PP
  262. \-\-no\-replace\-objects
  263. .RS 4
  264. Do not use replacement refs to replace Git objects\&. This is equivalent to exporting the
  265. \fBGIT_NO_REPLACE_OBJECTS\fR
  266. environment variable with any value\&. See
  267. \fBgit-replace\fR(1)
  268. for more information\&.
  269. .RE
  270. .PP
  271. \-\-no\-lazy\-fetch
  272. .RS 4
  273. Do not fetch missing objects from the promisor remote on demand\&. Useful together with
  274. \fBgit\fR
  275. \fBcat\-file\fR
  276. \fB\-e\fR
  277. \fI<object>\fR
  278. to see if the object is locally available\&. This is equivalent to setting the
  279. \fBGIT_NO_LAZY_FETCH\fR
  280. environment variable to
  281. \fB1\fR\&.
  282. .RE
  283. .PP
  284. \-\-no\-optional\-locks
  285. .RS 4
  286. Do not perform optional operations that require locks\&. This is equivalent to setting the
  287. \fBGIT_OPTIONAL_LOCKS\fR
  288. to
  289. \fB0\fR\&.
  290. .RE
  291. .PP
  292. \-\-no\-advice
  293. .RS 4
  294. Disable all advice hints from being printed\&.
  295. .RE
  296. .PP
  297. \-\-literal\-pathspecs
  298. .RS 4
  299. Treat pathspecs literally (i\&.e\&. no globbing, no pathspec magic)\&. This is equivalent to setting the
  300. \fBGIT_LITERAL_PATHSPECS\fR
  301. environment variable to
  302. \fB1\fR\&.
  303. .RE
  304. .PP
  305. \-\-glob\-pathspecs
  306. .RS 4
  307. Add "glob" magic to all pathspec\&. This is equivalent to setting the
  308. \fBGIT_GLOB_PATHSPECS\fR
  309. environment variable to
  310. \fB1\fR\&. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)"
  311. .RE
  312. .PP
  313. \-\-noglob\-pathspecs
  314. .RS 4
  315. Add "literal" magic to all pathspec\&. This is equivalent to setting the
  316. \fBGIT_NOGLOB_PATHSPECS\fR
  317. environment variable to
  318. \fB1\fR\&. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)"
  319. .RE
  320. .PP
  321. \-\-icase\-pathspecs
  322. .RS 4
  323. Add "icase" magic to all pathspec\&. This is equivalent to setting the
  324. \fBGIT_ICASE_PATHSPECS\fR
  325. environment variable to
  326. \fB1\fR\&.
  327. .RE
  328. .PP
  329. \-\-list\-cmds=<group>[,<group>\&...\:]
  330. .RS 4
  331. 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
  332. \fB$PATH\fR
  333. 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)
  334. .RE
  335. .PP
  336. \-\-attr\-source=<tree\-ish>
  337. .RS 4
  338. Read gitattributes from <tree\-ish> instead of the worktree\&. See
  339. \fBgitattributes\fR(5)\&. This is equivalent to setting the
  340. \fBGIT_ATTR_SOURCE\fR
  341. environment variable\&.
  342. .RE
  343. .SH "GIT COMMANDS"
  344. .sp
  345. We divide Git into high level ("porcelain") commands and low level ("plumbing") commands\&.
  346. .SH "HIGH\-LEVEL COMMANDS (PORCELAIN)"
  347. .sp
  348. We separate the porcelain commands into the main commands and some ancillary user utilities\&.
  349. .SS "Main porcelain commands"
  350. .PP
  351. \fBgit-add\fR(1)
  352. .RS 4
  353. Add file contents to the index\&.
  354. .RE
  355. .PP
  356. \fBgit-am\fR(1)
  357. .RS 4
  358. Apply a series of patches from a mailbox\&.
  359. .RE
  360. .PP
  361. \fBgit-archive\fR(1)
  362. .RS 4
  363. Create an archive of files from a named tree\&.
  364. .RE
  365. .PP
  366. \fBgit-backfill\fR(1)
  367. .RS 4
  368. Download missing objects in a partial clone\&.
  369. .RE
  370. .PP
  371. \fBgit-bisect\fR(1)
  372. .RS 4
  373. Use binary search to find the commit that introduced a bug\&.
  374. .RE
  375. .PP
  376. \fBgit-branch\fR(1)
  377. .RS 4
  378. List, create, or delete branches\&.
  379. .RE
  380. .PP
  381. \fBgit-bundle\fR(1)
  382. .RS 4
  383. Move objects and refs by archive\&.
  384. .RE
  385. .PP
  386. \fBgit-checkout\fR(1)
  387. .RS 4
  388. Switch branches or restore working tree files\&.
  389. .RE
  390. .PP
  391. \fBgit-cherry-pick\fR(1)
  392. .RS 4
  393. Apply the changes introduced by some existing commits\&.
  394. .RE
  395. .PP
  396. \fBgit-citool\fR(1)
  397. .RS 4
  398. Graphical alternative to git\-commit\&.
  399. .RE
  400. .PP
  401. \fBgit-clean\fR(1)
  402. .RS 4
  403. Remove untracked files from the working tree\&.
  404. .RE
  405. .PP
  406. \fBgit-clone\fR(1)
  407. .RS 4
  408. Clone a repository into a new directory\&.
  409. .RE
  410. .PP
  411. \fBgit-commit\fR(1)
  412. .RS 4
  413. Record changes to the repository\&.
  414. .RE
  415. .PP
  416. \fBgit-describe\fR(1)
  417. .RS 4
  418. Give an object a human readable name based on an available ref\&.
  419. .RE
  420. .PP
  421. \fBgit-diff\fR(1)
  422. .RS 4
  423. Show changes between commits, commit and working tree, etc\&.
  424. .RE
  425. .PP
  426. \fBgit-fetch\fR(1)
  427. .RS 4
  428. Download objects and refs from another repository\&.
  429. .RE
  430. .PP
  431. \fBgit-format-patch\fR(1)
  432. .RS 4
  433. Prepare patches for e\-mail submission\&.
  434. .RE
  435. .PP
  436. \fBgit-gc\fR(1)
  437. .RS 4
  438. Cleanup unnecessary files and optimize the local repository\&.
  439. .RE
  440. .PP
  441. \fBgit-grep\fR(1)
  442. .RS 4
  443. Print lines matching a pattern\&.
  444. .RE
  445. .PP
  446. \fBgit-gui\fR(1)
  447. .RS 4
  448. A portable graphical interface to Git\&.
  449. .RE
  450. .PP
  451. \fBgit-init\fR(1)
  452. .RS 4
  453. Create an empty Git repository or reinitialize an existing one\&.
  454. .RE
  455. .PP
  456. \fBgit-log\fR(1)
  457. .RS 4
  458. Show commit logs\&.
  459. .RE
  460. .PP
  461. \fBgit-maintenance\fR(1)
  462. .RS 4
  463. Run tasks to optimize Git repository data\&.
  464. .RE
  465. .PP
  466. \fBgit-merge\fR(1)
  467. .RS 4
  468. Join two or more development histories together\&.
  469. .RE
  470. .PP
  471. \fBgit-mv\fR(1)
  472. .RS 4
  473. Move or rename a file, a directory, or a symlink\&.
  474. .RE
  475. .PP
  476. \fBgit-notes\fR(1)
  477. .RS 4
  478. Add or inspect object notes\&.
  479. .RE
  480. .PP
  481. \fBgit-pull\fR(1)
  482. .RS 4
  483. Fetch from and integrate with another repository or a local branch\&.
  484. .RE
  485. .PP
  486. \fBgit-push\fR(1)
  487. .RS 4
  488. Update remote refs along with associated objects\&.
  489. .RE
  490. .PP
  491. \fBgit-range-diff\fR(1)
  492. .RS 4
  493. Compare two commit ranges (e\&.g\&. two versions of a branch)\&.
  494. .RE
  495. .PP
  496. \fBgit-rebase\fR(1)
  497. .RS 4
  498. Reapply commits on top of another base tip\&.
  499. .RE
  500. .PP
  501. \fBgit-reset\fR(1)
  502. .RS 4
  503. Reset current HEAD to the specified state\&.
  504. .RE
  505. .PP
  506. \fBgit-restore\fR(1)
  507. .RS 4
  508. Restore working tree files\&.
  509. .RE
  510. .PP
  511. \fBgit-revert\fR(1)
  512. .RS 4
  513. Revert some existing commits\&.
  514. .RE
  515. .PP
  516. \fBgit-rm\fR(1)
  517. .RS 4
  518. Remove files from the working tree and from the index\&.
  519. .RE
  520. .PP
  521. \fBgit-shortlog\fR(1)
  522. .RS 4
  523. Summarize
  524. \fIgit log\fR
  525. output\&.
  526. .RE
  527. .PP
  528. \fBgit-show\fR(1)
  529. .RS 4
  530. Show various types of objects\&.
  531. .RE
  532. .PP
  533. \fBgit-sparse-checkout\fR(1)
  534. .RS 4
  535. Reduce your working tree to a subset of tracked files\&.
  536. .RE
  537. .PP
  538. \fBgit-stash\fR(1)
  539. .RS 4
  540. Stash the changes in a dirty working directory away\&.
  541. .RE
  542. .PP
  543. \fBgit-status\fR(1)
  544. .RS 4
  545. Show the working tree status\&.
  546. .RE
  547. .PP
  548. \fBgit-submodule\fR(1)
  549. .RS 4
  550. Initialize, update or inspect submodules\&.
  551. .RE
  552. .PP
  553. \fBgit-switch\fR(1)
  554. .RS 4
  555. Switch branches\&.
  556. .RE
  557. .PP
  558. \fBgit-tag\fR(1)
  559. .RS 4
  560. Create, list, delete or verify a tag object signed with GPG\&.
  561. .RE
  562. .PP
  563. \fBgit-worktree\fR(1)
  564. .RS 4
  565. Manage multiple working trees\&.
  566. .RE
  567. .PP
  568. \fBgitk\fR(1)
  569. .RS 4
  570. The Git repository browser\&.
  571. .RE
  572. .PP
  573. \fBscalar\fR(1)
  574. .RS 4
  575. A tool for managing large Git repositories\&.
  576. .RE
  577. .SS "Ancillary Commands"
  578. .sp
  579. Manipulators:
  580. .PP
  581. \fBgit-config\fR(1)
  582. .RS 4
  583. Get and set repository or global options\&.
  584. .RE
  585. .PP
  586. \fBgit-fast-export\fR(1)
  587. .RS 4
  588. Git data exporter\&.
  589. .RE
  590. .PP
  591. \fBgit-fast-import\fR(1)
  592. .RS 4
  593. Backend for fast Git data importers\&.
  594. .RE
  595. .PP
  596. \fBgit-filter-branch\fR(1)
  597. .RS 4
  598. Rewrite branches\&.
  599. .RE
  600. .PP
  601. \fBgit-mergetool\fR(1)
  602. .RS 4
  603. Run merge conflict resolution tools to resolve merge conflicts\&.
  604. .RE
  605. .PP
  606. \fBgit-pack-refs\fR(1)
  607. .RS 4
  608. Pack heads and tags for efficient repository access\&.
  609. .RE
  610. .PP
  611. \fBgit-prune\fR(1)
  612. .RS 4
  613. Prune all unreachable objects from the object database\&.
  614. .RE
  615. .PP
  616. \fBgit-reflog\fR(1)
  617. .RS 4
  618. Manage reflog information\&.
  619. .RE
  620. .PP
  621. \fBgit-refs\fR(1)
  622. .RS 4
  623. Low\-level access to refs\&.
  624. .RE
  625. .PP
  626. \fBgit-remote\fR(1)
  627. .RS 4
  628. Manage set of tracked repositories\&.
  629. .RE
  630. .PP
  631. \fBgit-repack\fR(1)
  632. .RS 4
  633. Pack unpacked objects in a repository\&.
  634. .RE
  635. .PP
  636. \fBgit-replace\fR(1)
  637. .RS 4
  638. Create, list, delete refs to replace objects\&.
  639. .RE
  640. .sp
  641. Interrogators:
  642. .PP
  643. \fBgit-annotate\fR(1)
  644. .RS 4
  645. Annotate file lines with commit information\&.
  646. .RE
  647. .PP
  648. \fBgit-blame\fR(1)
  649. .RS 4
  650. Show what revision and author last modified each line of a file\&.
  651. .RE
  652. .PP
  653. \fBgit-bugreport\fR(1)
  654. .RS 4
  655. Collect information for user to file a bug report\&.
  656. .RE
  657. .PP
  658. \fBgit-count-objects\fR(1)
  659. .RS 4
  660. Count unpacked number of objects and their disk consumption\&.
  661. .RE
  662. .PP
  663. \fBgit-diagnose\fR(1)
  664. .RS 4
  665. Generate a zip archive of diagnostic information\&.
  666. .RE
  667. .PP
  668. \fBgit-difftool\fR(1)
  669. .RS 4
  670. Show changes using common diff tools\&.
  671. .RE
  672. .PP
  673. \fBgit-fsck\fR(1)
  674. .RS 4
  675. Verifies the connectivity and validity of the objects in the database\&.
  676. .RE
  677. .PP
  678. \fBgit-help\fR(1)
  679. .RS 4
  680. Display help information about Git\&.
  681. .RE
  682. .PP
  683. \fBgit-instaweb\fR(1)
  684. .RS 4
  685. Instantly browse your working repository in gitweb\&.
  686. .RE
  687. .PP
  688. \fBgit-merge-tree\fR(1)
  689. .RS 4
  690. Perform merge without touching index or working tree\&.
  691. .RE
  692. .PP
  693. \fBgit-rerere\fR(1)
  694. .RS 4
  695. Reuse recorded resolution of conflicted merges\&.
  696. .RE
  697. .PP
  698. \fBgit-show-branch\fR(1)
  699. .RS 4
  700. Show branches and their commits\&.
  701. .RE
  702. .PP
  703. \fBgit-verify-commit\fR(1)
  704. .RS 4
  705. Check the GPG signature of commits\&.
  706. .RE
  707. .PP
  708. \fBgit-verify-tag\fR(1)
  709. .RS 4
  710. Check the GPG signature of tags\&.
  711. .RE
  712. .PP
  713. \fBgit-version\fR(1)
  714. .RS 4
  715. Display version information about Git\&.
  716. .RE
  717. .PP
  718. \fBgit-whatchanged\fR(1)
  719. .RS 4
  720. Show logs with differences each commit introduces\&.
  721. .RE
  722. .PP
  723. \fBgitweb\fR(1)
  724. .RS 4
  725. Git web interface (web frontend to Git repositories)\&.
  726. .RE
  727. .SS "Interacting with Others"
  728. .sp
  729. These commands are to interact with foreign SCM and with other people via patch over e\-mail\&.
  730. .PP
  731. \fBgit-archimport\fR(1)
  732. .RS 4
  733. Import a GNU Arch repository into Git\&.
  734. .RE
  735. .PP
  736. \fBgit-cvsexportcommit\fR(1)
  737. .RS 4
  738. Export a single commit to a CVS checkout\&.
  739. .RE
  740. .PP
  741. \fBgit-cvsimport\fR(1)
  742. .RS 4
  743. Salvage your data out of another SCM people love to hate\&.
  744. .RE
  745. .PP
  746. \fBgit-cvsserver\fR(1)
  747. .RS 4
  748. A CVS server emulator for Git\&.
  749. .RE
  750. .PP
  751. \fBgit-imap-send\fR(1)
  752. .RS 4
  753. Send a collection of patches from stdin to an IMAP folder\&.
  754. .RE
  755. .PP
  756. \fBgit-p4\fR(1)
  757. .RS 4
  758. Import from and submit to Perforce repositories\&.
  759. .RE
  760. .PP
  761. \fBgit-quiltimport\fR(1)
  762. .RS 4
  763. Applies a quilt patchset onto the current branch\&.
  764. .RE
  765. .PP
  766. \fBgit-request-pull\fR(1)
  767. .RS 4
  768. Generates a summary of pending changes\&.
  769. .RE
  770. .PP
  771. \fBgit-send-email\fR(1)
  772. .RS 4
  773. Send a collection of patches as emails\&.
  774. .RE
  775. .PP
  776. \fBgit-svn\fR(1)
  777. .RS 4
  778. Bidirectional operation between a Subversion repository and Git\&.
  779. .RE
  780. .SS "Reset, restore and revert"
  781. .sp
  782. There are three commands with similar names: \fBgit\fR \fBreset\fR, \fBgit\fR \fBrestore\fR and \fBgit\fR \fBrevert\fR\&.
  783. .sp
  784. .RS 4
  785. .ie n \{\
  786. \h'-04'\(bu\h'+03'\c
  787. .\}
  788. .el \{\
  789. .sp -1
  790. .IP \(bu 2.3
  791. .\}
  792. \fBgit-revert\fR(1)
  793. is about making a new commit that reverts the changes made by other commits\&.
  794. .RE
  795. .sp
  796. .RS 4
  797. .ie n \{\
  798. \h'-04'\(bu\h'+03'\c
  799. .\}
  800. .el \{\
  801. .sp -1
  802. .IP \(bu 2.3
  803. .\}
  804. \fBgit-restore\fR(1)
  805. is about restoring files in the working tree from either the index or another commit\&. This command does not update your branch\&. The command can also be used to restore files in the index from another commit\&.
  806. .RE
  807. .sp
  808. .RS 4
  809. .ie n \{\
  810. \h'-04'\(bu\h'+03'\c
  811. .\}
  812. .el \{\
  813. .sp -1
  814. .IP \(bu 2.3
  815. .\}
  816. \fBgit-reset\fR(1)
  817. is about updating your branch, moving the tip in order to add or remove commits from the branch\&. This operation changes the commit history\&.
  818. .sp
  819. \fBgit\fR
  820. \fBreset\fR
  821. can also be used to restore the index, overlapping with
  822. \fBgit\fR
  823. \fBrestore\fR\&.
  824. .RE
  825. .SH "LOW\-LEVEL COMMANDS (PLUMBING)"
  826. .sp
  827. Although Git includes its own porcelain layer, its low\-level commands are sufficient to support development of alternative porcelains\&. Developers of such porcelains might start by reading about \fBgit-update-index\fR(1) and \fBgit-read-tree\fR(1)\&.
  828. .sp
  829. The interface (input, output, set of options and the semantics) to these low\-level commands are meant to be a lot more stable than Porcelain level commands, because these commands are primarily for scripted use\&. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience\&.
  830. .sp
  831. The following description divides the low\-level commands into commands that manipulate objects (in the repository, index, and working tree), commands that interrogate and compare objects, and commands that move objects and references between repositories\&.
  832. .SS "Manipulation commands"
  833. .PP
  834. \fBgit-apply\fR(1)
  835. .RS 4
  836. Apply a patch to files and/or to the index\&.
  837. .RE
  838. .PP
  839. \fBgit-checkout-index\fR(1)
  840. .RS 4
  841. Copy files from the index to the working tree\&.
  842. .RE
  843. .PP
  844. \fBgit-commit-graph\fR(1)
  845. .RS 4
  846. Write and verify Git commit\-graph files\&.
  847. .RE
  848. .PP
  849. \fBgit-commit-tree\fR(1)
  850. .RS 4
  851. Create a new commit object\&.
  852. .RE
  853. .PP
  854. \fBgit-hash-object\fR(1)
  855. .RS 4
  856. Compute object ID and optionally create an object from a file\&.
  857. .RE
  858. .PP
  859. \fBgit-index-pack\fR(1)
  860. .RS 4
  861. Build pack index file for an existing packed archive\&.
  862. .RE
  863. .PP
  864. \fBgit-merge-file\fR(1)
  865. .RS 4
  866. Run a three\-way file merge\&.
  867. .RE
  868. .PP
  869. \fBgit-merge-index\fR(1)
  870. .RS 4
  871. Run a merge for files needing merging\&.
  872. .RE
  873. .PP
  874. \fBgit-mktag\fR(1)
  875. .RS 4
  876. Creates a tag object with extra validation\&.
  877. .RE
  878. .PP
  879. \fBgit-mktree\fR(1)
  880. .RS 4
  881. Build a tree\-object from ls\-tree formatted text\&.
  882. .RE
  883. .PP
  884. \fBgit-multi-pack-index\fR(1)
  885. .RS 4
  886. Write and verify multi\-pack\-indexes\&.
  887. .RE
  888. .PP
  889. \fBgit-pack-objects\fR(1)
  890. .RS 4
  891. Create a packed archive of objects\&.
  892. .RE
  893. .PP
  894. \fBgit-prune-packed\fR(1)
  895. .RS 4
  896. Remove extra objects that are already in pack files\&.
  897. .RE
  898. .PP
  899. \fBgit-read-tree\fR(1)
  900. .RS 4
  901. Reads tree information into the index\&.
  902. .RE
  903. .PP
  904. \fBgit-replay\fR(1)
  905. .RS 4
  906. EXPERIMENTAL: Replay commits on a new base, works with bare repos too\&.
  907. .RE
  908. .PP
  909. \fBgit-symbolic-ref\fR(1)
  910. .RS 4
  911. Read, modify and delete symbolic refs\&.
  912. .RE
  913. .PP
  914. \fBgit-unpack-objects\fR(1)
  915. .RS 4
  916. Unpack objects from a packed archive\&.
  917. .RE
  918. .PP
  919. \fBgit-update-index\fR(1)
  920. .RS 4
  921. Register file contents in the working tree to the index\&.
  922. .RE
  923. .PP
  924. \fBgit-update-ref\fR(1)
  925. .RS 4
  926. Update the object name stored in a ref safely\&.
  927. .RE
  928. .PP
  929. \fBgit-write-tree\fR(1)
  930. .RS 4
  931. Create a tree object from the current index\&.
  932. .RE
  933. .SS "Interrogation commands"
  934. .PP
  935. \fBgit-cat-file\fR(1)
  936. .RS 4
  937. Provide contents or details of repository objects\&.
  938. .RE
  939. .PP
  940. \fBgit-cherry\fR(1)
  941. .RS 4
  942. Find commits yet to be applied to upstream\&.
  943. .RE
  944. .PP
  945. \fBgit-diff-files\fR(1)
  946. .RS 4
  947. Compares files in the working tree and the index\&.
  948. .RE
  949. .PP
  950. \fBgit-diff-index\fR(1)
  951. .RS 4
  952. Compare a tree to the working tree or index\&.
  953. .RE
  954. .PP
  955. \fBgit-diff-tree\fR(1)
  956. .RS 4
  957. Compares the content and mode of blobs found via two tree objects\&.
  958. .RE
  959. .PP
  960. \fBgit-for-each-ref\fR(1)
  961. .RS 4
  962. Output information on each ref\&.
  963. .RE
  964. .PP
  965. \fBgit-for-each-repo\fR(1)
  966. .RS 4
  967. Run a Git command on a list of repositories\&.
  968. .RE
  969. .PP
  970. \fBgit-get-tar-commit-id\fR(1)
  971. .RS 4
  972. Extract commit ID from an archive created using git\-archive\&.
  973. .RE
  974. .PP
  975. \fBgit-ls-files\fR(1)
  976. .RS 4
  977. Show information about files in the index and the working tree\&.
  978. .RE
  979. .PP
  980. \fBgit-ls-remote\fR(1)
  981. .RS 4
  982. List references in a remote repository\&.
  983. .RE
  984. .PP
  985. \fBgit-ls-tree\fR(1)
  986. .RS 4
  987. List the contents of a tree object\&.
  988. .RE
  989. .PP
  990. \fBgit-merge-base\fR(1)
  991. .RS 4
  992. Find as good common ancestors as possible for a merge\&.
  993. .RE
  994. .PP
  995. \fBgit-name-rev\fR(1)
  996. .RS 4
  997. Find symbolic names for given revs\&.
  998. .RE
  999. .PP
  1000. \fBgit-pack-redundant\fR(1)
  1001. .RS 4
  1002. Find redundant pack files\&.
  1003. .RE
  1004. .PP
  1005. \fBgit-rev-list\fR(1)
  1006. .RS 4
  1007. Lists commit objects in reverse chronological order\&.
  1008. .RE
  1009. .PP
  1010. \fBgit-rev-parse\fR(1)
  1011. .RS 4
  1012. Pick out and massage parameters\&.
  1013. .RE
  1014. .PP
  1015. \fBgit-show-index\fR(1)
  1016. .RS 4
  1017. Show packed archive index\&.
  1018. .RE
  1019. .PP
  1020. \fBgit-show-ref\fR(1)
  1021. .RS 4
  1022. List references in a local repository\&.
  1023. .RE
  1024. .PP
  1025. \fBgit-unpack-file\fR(1)
  1026. .RS 4
  1027. Creates a temporary file with a blob\(cqs contents\&.
  1028. .RE
  1029. .PP
  1030. \fBgit-var\fR(1)
  1031. .RS 4
  1032. Show a Git logical variable\&.
  1033. .RE
  1034. .PP
  1035. \fBgit-verify-pack\fR(1)
  1036. .RS 4
  1037. Validate packed Git archive files\&.
  1038. .RE
  1039. .sp
  1040. In general, the interrogate commands do not touch the files in the working tree\&.
  1041. .SS "Syncing repositories"
  1042. .PP
  1043. \fBgit-daemon\fR(1)
  1044. .RS 4
  1045. A really simple server for Git repositories\&.
  1046. .RE
  1047. .PP
  1048. \fBgit-fetch-pack\fR(1)
  1049. .RS 4
  1050. Receive missing objects from another repository\&.
  1051. .RE
  1052. .PP
  1053. \fBgit-http-backend\fR(1)
  1054. .RS 4
  1055. Server side implementation of Git over HTTP\&.
  1056. .RE
  1057. .PP
  1058. \fBgit-send-pack\fR(1)
  1059. .RS 4
  1060. Push objects over Git protocol to another repository\&.
  1061. .RE
  1062. .PP
  1063. \fBgit-update-server-info\fR(1)
  1064. .RS 4
  1065. Update auxiliary info file to help dumb servers\&.
  1066. .RE
  1067. .sp
  1068. The following are helper commands used by the above; end users typically do not use them directly\&.
  1069. .PP
  1070. \fBgit-http-fetch\fR(1)
  1071. .RS 4
  1072. Download from a remote Git repository via HTTP\&.
  1073. .RE
  1074. .PP
  1075. \fBgit-http-push\fR(1)
  1076. .RS 4
  1077. Push objects over HTTP/DAV to another repository\&.
  1078. .RE
  1079. .PP
  1080. \fBgit-receive-pack\fR(1)
  1081. .RS 4
  1082. Receive what is pushed into the repository\&.
  1083. .RE
  1084. .PP
  1085. \fBgit-shell\fR(1)
  1086. .RS 4
  1087. Restricted login shell for Git\-only SSH access\&.
  1088. .RE
  1089. .PP
  1090. \fBgit-upload-archive\fR(1)
  1091. .RS 4
  1092. Send archive back to git\-archive\&.
  1093. .RE
  1094. .PP
  1095. \fBgit-upload-pack\fR(1)
  1096. .RS 4
  1097. Send objects packed back to git\-fetch\-pack\&.
  1098. .RE
  1099. .SS "Internal helper commands"
  1100. .sp
  1101. These are internal helper commands used by other commands; end users typically do not use them directly\&.
  1102. .PP
  1103. \fBgit-check-attr\fR(1)
  1104. .RS 4
  1105. Display gitattributes information\&.
  1106. .RE
  1107. .PP
  1108. \fBgit-check-ignore\fR(1)
  1109. .RS 4
  1110. Debug gitignore / exclude files\&.
  1111. .RE
  1112. .PP
  1113. \fBgit-check-mailmap\fR(1)
  1114. .RS 4
  1115. Show canonical names and email addresses of contacts\&.
  1116. .RE
  1117. .PP
  1118. \fBgit-check-ref-format\fR(1)
  1119. .RS 4
  1120. Ensures that a reference name is well formed\&.
  1121. .RE
  1122. .PP
  1123. \fBgit-column\fR(1)
  1124. .RS 4
  1125. Display data in columns\&.
  1126. .RE
  1127. .PP
  1128. \fBgit-credential\fR(1)
  1129. .RS 4
  1130. Retrieve and store user credentials\&.
  1131. .RE
  1132. .PP
  1133. \fBgit-credential-cache\fR(1)
  1134. .RS 4
  1135. Helper to temporarily store passwords in memory\&.
  1136. .RE
  1137. .PP
  1138. \fBgit-credential-store\fR(1)
  1139. .RS 4
  1140. Helper to store credentials on disk\&.
  1141. .RE
  1142. .PP
  1143. \fBgit-fmt-merge-msg\fR(1)
  1144. .RS 4
  1145. Produce a merge commit message\&.
  1146. .RE
  1147. .PP
  1148. \fBgit-hook\fR(1)
  1149. .RS 4
  1150. Run git hooks\&.
  1151. .RE
  1152. .PP
  1153. \fBgit-interpret-trailers\fR(1)
  1154. .RS 4
  1155. Add or parse structured information in commit messages\&.
  1156. .RE
  1157. .PP
  1158. \fBgit-mailinfo\fR(1)
  1159. .RS 4
  1160. Extracts patch and authorship from a single e\-mail message\&.
  1161. .RE
  1162. .PP
  1163. \fBgit-mailsplit\fR(1)
  1164. .RS 4
  1165. Simple UNIX mbox splitter program\&.
  1166. .RE
  1167. .PP
  1168. \fBgit-merge-one-file\fR(1)
  1169. .RS 4
  1170. The standard helper program to use with git\-merge\-index\&.
  1171. .RE
  1172. .PP
  1173. \fBgit-patch-id\fR(1)
  1174. .RS 4
  1175. Compute unique ID for a patch\&.
  1176. .RE
  1177. .PP
  1178. \fBgit-sh-i18n\fR(1)
  1179. .RS 4
  1180. Git\(cqs i18n setup code for shell scripts\&.
  1181. .RE
  1182. .PP
  1183. \fBgit-sh-setup\fR(1)
  1184. .RS 4
  1185. Common Git shell script setup code\&.
  1186. .RE
  1187. .PP
  1188. \fBgit-stripspace\fR(1)
  1189. .RS 4
  1190. Remove unnecessary whitespace\&.
  1191. .RE
  1192. .SH "GUIDES"
  1193. .sp
  1194. The following documentation pages are guides about Git concepts\&.
  1195. .PP
  1196. \fBgitcore-tutorial\fR(7)
  1197. .RS 4
  1198. A Git core tutorial for developers\&.
  1199. .RE
  1200. .PP
  1201. \fBgitcredentials\fR(7)
  1202. .RS 4
  1203. Providing usernames and passwords to Git\&.
  1204. .RE
  1205. .PP
  1206. \fBgitcvs-migration\fR(7)
  1207. .RS 4
  1208. Git for CVS users\&.
  1209. .RE
  1210. .PP
  1211. \fBgitdiffcore\fR(7)
  1212. .RS 4
  1213. Tweaking diff output\&.
  1214. .RE
  1215. .PP
  1216. \fBgiteveryday\fR(7)
  1217. .RS 4
  1218. A useful minimum set of commands for Everyday Git\&.
  1219. .RE
  1220. .PP
  1221. \fBgitfaq\fR(7)
  1222. .RS 4
  1223. Frequently asked questions about using Git\&.
  1224. .RE
  1225. .PP
  1226. \fBgitglossary\fR(7)
  1227. .RS 4
  1228. A Git Glossary\&.
  1229. .RE
  1230. .PP
  1231. \fBgitnamespaces\fR(7)
  1232. .RS 4
  1233. Git namespaces\&.
  1234. .RE
  1235. .PP
  1236. \fBgitremote-helpers\fR(7)
  1237. .RS 4
  1238. Helper programs to interact with remote repositories\&.
  1239. .RE
  1240. .PP
  1241. \fBgitsubmodules\fR(7)
  1242. .RS 4
  1243. Mounting one repository inside another\&.
  1244. .RE
  1245. .PP
  1246. \fBgittutorial\fR(7)
  1247. .RS 4
  1248. A tutorial introduction to Git\&.
  1249. .RE
  1250. .PP
  1251. \fBgittutorial-2\fR(7)
  1252. .RS 4
  1253. A tutorial introduction to Git: part two\&.
  1254. .RE
  1255. .PP
  1256. \fBgitworkflows\fR(7)
  1257. .RS 4
  1258. An overview of recommended workflows with Git\&.
  1259. .RE
  1260. .SH "REPOSITORY, COMMAND AND FILE INTERFACES"
  1261. .sp
  1262. This documentation discusses repository and command interfaces which users are expected to interact with directly\&. See \fB\-\-user\-formats\fR in \fBgit-help\fR(1) for more details on the criteria\&.
  1263. .PP
  1264. \fBgitattributes\fR(5)
  1265. .RS 4
  1266. Defining attributes per path\&.
  1267. .RE
  1268. .PP
  1269. \fBgitcli\fR(7)
  1270. .RS 4
  1271. Git command\-line interface and conventions\&.
  1272. .RE
  1273. .PP
  1274. \fBgithooks\fR(5)
  1275. .RS 4
  1276. Hooks used by Git\&.
  1277. .RE
  1278. .PP
  1279. \fBgitignore\fR(5)
  1280. .RS 4
  1281. Specifies intentionally untracked files to ignore\&.
  1282. .RE
  1283. .PP
  1284. \fBgitmailmap\fR(5)
  1285. .RS 4
  1286. Map author/committer names and/or E\-Mail addresses\&.
  1287. .RE
  1288. .PP
  1289. \fBgitmodules\fR(5)
  1290. .RS 4
  1291. Defining submodule properties\&.
  1292. .RE
  1293. .PP
  1294. \fBgitrepository-layout\fR(5)
  1295. .RS 4
  1296. Git Repository Layout\&.
  1297. .RE
  1298. .PP
  1299. \fBgitrevisions\fR(7)
  1300. .RS 4
  1301. Specifying revisions and ranges for Git\&.
  1302. .RE
  1303. .SH "FILE FORMATS, PROTOCOLS AND OTHER DEVELOPER INTERFACES"
  1304. .sp
  1305. This documentation discusses file formats, over\-the\-wire protocols and other git developer interfaces\&. See \fB\-\-developer\-interfaces\fR in \fBgit-help\fR(1)\&.
  1306. .PP
  1307. \fBgitformat-bundle\fR(5)
  1308. .RS 4
  1309. The bundle file format\&.
  1310. .RE
  1311. .PP
  1312. \fBgitformat-chunk\fR(5)
  1313. .RS 4
  1314. Chunk\-based file formats\&.
  1315. .RE
  1316. .PP
  1317. \fBgitformat-commit-graph\fR(5)
  1318. .RS 4
  1319. Git commit\-graph format\&.
  1320. .RE
  1321. .PP
  1322. \fBgitformat-index\fR(5)
  1323. .RS 4
  1324. Git index format\&.
  1325. .RE
  1326. .PP
  1327. \fBgitformat-pack\fR(5)
  1328. .RS 4
  1329. Git pack format\&.
  1330. .RE
  1331. .PP
  1332. \fBgitformat-signature\fR(5)
  1333. .RS 4
  1334. Git cryptographic signature formats\&.
  1335. .RE
  1336. .PP
  1337. \fBgitprotocol-capabilities\fR(5)
  1338. .RS 4
  1339. Protocol v0 and v1 capabilities\&.
  1340. .RE
  1341. .PP
  1342. \fBgitprotocol-common\fR(5)
  1343. .RS 4
  1344. Things common to various protocols\&.
  1345. .RE
  1346. .PP
  1347. \fBgitprotocol-http\fR(5)
  1348. .RS 4
  1349. Git HTTP\-based protocols\&.
  1350. .RE
  1351. .PP
  1352. \fBgitprotocol-pack\fR(5)
  1353. .RS 4
  1354. How packs are transferred over\-the\-wire\&.
  1355. .RE
  1356. .PP
  1357. \fBgitprotocol-v2\fR(5)
  1358. .RS 4
  1359. Git Wire Protocol, Version 2\&.
  1360. .RE
  1361. .SH "CONFIGURATION MECHANISM"
  1362. .sp
  1363. Git uses a simple text format to store customizations that are per repository and are per user\&. Such a configuration file may look like this:
  1364. .sp
  1365. .if n \{\
  1366. .RS 4
  1367. .\}
  1368. .nf
  1369. #
  1370. # A \*(Aq#\*(Aq or \*(Aq;\*(Aq character indicates a comment\&.
  1371. #
  1372. ; core variables
  1373. [core]
  1374. ; Don\*(Aqt trust file modes
  1375. filemode = false
  1376. ; user identity
  1377. [user]
  1378. name = "Junio C Hamano"
  1379. email = "gitster@pobox\&.com"
  1380. .fi
  1381. .if n \{\
  1382. .RE
  1383. .\}
  1384. .sp
  1385. Various commands read from the configuration file and adjust their operation accordingly\&. See \fBgit-config\fR(1) for a list and more details about the configuration mechanism\&.
  1386. .SH "IDENTIFIER TERMINOLOGY"
  1387. .PP
  1388. <object>
  1389. .RS 4
  1390. Indicates the object name for any type of object\&.
  1391. .RE
  1392. .PP
  1393. <blob>
  1394. .RS 4
  1395. Indicates a blob object name\&.
  1396. .RE
  1397. .PP
  1398. <tree>
  1399. .RS 4
  1400. Indicates a tree object name\&.
  1401. .RE
  1402. .PP
  1403. <commit>
  1404. .RS 4
  1405. Indicates a commit object name\&.
  1406. .RE
  1407. .PP
  1408. <tree\-ish>
  1409. .RS 4
  1410. Indicates a tree, commit or tag object name\&. A command that takes a <tree\-ish> argument ultimately wants to operate on a <tree> object but automatically dereferences <commit> and <tag> objects that point at a <tree>\&.
  1411. .RE
  1412. .PP
  1413. <commit\-ish>
  1414. .RS 4
  1415. Indicates a commit or tag object name\&. A command that takes a <commit\-ish> argument ultimately wants to operate on a <commit> object but automatically dereferences <tag> objects that point at a <commit>\&.
  1416. .RE
  1417. .PP
  1418. <type>
  1419. .RS 4
  1420. Indicates that an object type is required\&. Currently one of:
  1421. \fBblob\fR,
  1422. \fBtree\fR,
  1423. \fBcommit\fR, or
  1424. \fBtag\fR\&.
  1425. .RE
  1426. .PP
  1427. <file>
  1428. .RS 4
  1429. Indicates a filename \- almost always relative to the root of the tree structure
  1430. \fBGIT_INDEX_FILE\fR
  1431. describes\&.
  1432. .RE
  1433. .SH "SYMBOLIC IDENTIFIERS"
  1434. .sp
  1435. Any Git command accepting any <object> can also use the following symbolic notation:
  1436. .PP
  1437. HEAD
  1438. .RS 4
  1439. indicates the head of the current branch\&.
  1440. .RE
  1441. .PP
  1442. <tag>
  1443. .RS 4
  1444. a valid tag
  1445. \fIname\fR
  1446. (i\&.e\&. a
  1447. \fBrefs/tags/\fR\fI<tag>\fR
  1448. reference)\&.
  1449. .RE
  1450. .PP
  1451. <head>
  1452. .RS 4
  1453. a valid head
  1454. \fIname\fR
  1455. (i\&.e\&. a
  1456. \fBrefs/heads/\fR\fI<head>\fR
  1457. reference)\&.
  1458. .RE
  1459. .sp
  1460. For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in \fBgitrevisions\fR(7)\&.
  1461. .SH "FILE/DIRECTORY STRUCTURE"
  1462. .sp
  1463. Please see the \fBgitrepository-layout\fR(5) document\&.
  1464. .sp
  1465. Read \fBgithooks\fR(5) for more details about each hook\&.
  1466. .sp
  1467. Higher level SCMs may provide and manage additional information in the \fB$GIT_DIR\fR\&.
  1468. .SH "TERMINOLOGY"
  1469. .sp
  1470. Please see \fBgitglossary\fR(7)\&.
  1471. .SH "ENVIRONMENT VARIABLES"
  1472. .sp
  1473. Various Git commands pay attention to environment variables and change their behavior\&. The environment variables marked as "Boolean" take their values the same way as Boolean valued configuration variables, i\&.e\&., "true", "yes", "on" and positive numbers are taken as "yes", while "false", "no", "off", and "0" are taken as "no"\&.
  1474. .sp
  1475. Here are the variables:
  1476. .SS "System"
  1477. .PP
  1478. \fBHOME\fR
  1479. .RS 4
  1480. Specifies the path to the user\(cqs home directory\&. On Windows, if unset, Git will set a process environment variable equal to:
  1481. \fB$HOMEDRIVE$HOMEPATH\fR
  1482. if both
  1483. \fB$HOMEDRIVE\fR
  1484. and
  1485. \fB$HOMEPATH\fR
  1486. exist; otherwise
  1487. \fB$USERPROFILE\fR
  1488. if
  1489. \fB$USERPROFILE\fR
  1490. exists\&.
  1491. .RE
  1492. .SS "The Git Repository"
  1493. .sp
  1494. These environment variables apply to \fIall\fR core Git commands\&. Nb: it is worth noting that they may be used/overridden by SCMS sitting above Git so take care if using a foreign front\-end\&.
  1495. .PP
  1496. \fBGIT_INDEX_FILE\fR
  1497. .RS 4
  1498. This environment variable specifies an alternate index file\&. If not specified, the default of
  1499. \fB$GIT_DIR/index\fR
  1500. is used\&.
  1501. .RE
  1502. .PP
  1503. \fBGIT_INDEX_VERSION\fR
  1504. .RS 4
  1505. This environment variable specifies what index version is used when writing the index file out\&. It won\(cqt affect existing index files\&. By default index file version 2 or 3 is used\&. See
  1506. \fBgit-update-index\fR(1)
  1507. for more information\&.
  1508. .RE
  1509. .PP
  1510. \fBGIT_OBJECT_DIRECTORY\fR
  1511. .RS 4
  1512. If the object storage directory is specified via this environment variable then the sha1 directories are created underneath \- otherwise the default
  1513. \fB$GIT_DIR/objects\fR
  1514. directory is used\&.
  1515. .RE
  1516. .PP
  1517. \fBGIT_ALTERNATE_OBJECT_DIRECTORIES\fR
  1518. .RS 4
  1519. Due to the immutable nature of Git objects, old objects can be archived into shared, read\-only directories\&. This variable specifies a ":" separated (on Windows ";" separated) list of Git object directories which can be used to search for Git objects\&. New objects will not be written to these directories\&.
  1520. .sp
  1521. Entries that begin with " (double\-quote) will be interpreted as C\-style quoted paths, removing leading and trailing double\-quotes and respecting backslash escapes\&. E\&.g\&., the value "path\-with\-\e"\-and\-:\-in\-it":vanilla\-path has two paths:
  1522. \fBpath\-with\-\fR"\-and\-:\-in\-it and
  1523. \fBvanilla\-path\fR\&.
  1524. .RE
  1525. .PP
  1526. \fBGIT_DIR\fR
  1527. .RS 4
  1528. If the
  1529. \fBGIT_DIR\fR
  1530. environment variable is set then it specifies a path to use instead of the default \&.\fBgit\fR
  1531. for the base of the repository\&. The
  1532. \fB\-\-git\-dir\fR
  1533. command\-line option also sets this value\&.
  1534. .RE
  1535. .PP
  1536. \fBGIT_WORK_TREE\fR
  1537. .RS 4
  1538. Set the path to the root of the working tree\&. This can also be controlled by the
  1539. \fB\-\-work\-tree\fR
  1540. command\-line option and the core\&.worktree configuration variable\&.
  1541. .RE
  1542. .PP
  1543. \fBGIT_NAMESPACE\fR
  1544. .RS 4
  1545. Set the Git namespace; see
  1546. \fBgitnamespaces\fR(7)
  1547. for details\&. The
  1548. \fB\-\-namespace\fR
  1549. command\-line option also sets this value\&.
  1550. .RE
  1551. .PP
  1552. \fBGIT_CEILING_DIRECTORIES\fR
  1553. .RS 4
  1554. This should be a colon\-separated list of absolute paths\&. If set, it is a list of directories that Git should not chdir up into while looking for a repository directory (useful for excluding slow\-loading network directories)\&. It will not exclude the current working directory or a GIT_DIR set on the command line or in the environment\&. Normally, Git has to read the entries in this list and resolve any symlink that might be present in order to compare them with the current directory\&. However, if even this access is slow, you can add an empty entry to the list to tell Git that the subsequent entries are not symlinks and needn\(cqt be resolved; e\&.g\&.,
  1555. \fBGIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink\fR\&.
  1556. .RE
  1557. .PP
  1558. \fBGIT_DISCOVERY_ACROSS_FILESYSTEM\fR
  1559. .RS 4
  1560. When run in a directory that does not have "\&.git" repository directory, Git tries to find such a directory in the parent directories to find the top of the working tree, but by default it does not cross filesystem boundaries\&. This Boolean environment variable can be set to true to tell Git not to stop at filesystem boundaries\&. Like
  1561. \fBGIT_CEILING_DIRECTORIES\fR, this will not affect an explicit repository directory set via
  1562. \fBGIT_DIR\fR
  1563. or on the command line\&.
  1564. .RE
  1565. .PP
  1566. \fBGIT_COMMON_DIR\fR
  1567. .RS 4
  1568. If this variable is set to a path, non\-worktree files that are normally in $GIT_DIR will be taken from this path instead\&. Worktree\-specific files such as HEAD or index are taken from $GIT_DIR\&. See
  1569. \fBgitrepository-layout\fR(5)
  1570. and
  1571. \fBgit-worktree\fR(1)
  1572. for details\&. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY\&...\:
  1573. .RE
  1574. .PP
  1575. \fBGIT_DEFAULT_HASH\fR
  1576. .RS 4
  1577. If this variable is set, the default hash algorithm for new repositories will be set to this value\&. This value is ignored when cloning and the setting of the remote repository is always used\&. The default is "sha1"\&. See
  1578. \fB\-\-object\-format\fR
  1579. in
  1580. \fBgit-init\fR(1)\&.
  1581. .RE
  1582. .PP
  1583. \fBGIT_DEFAULT_REF_FORMAT\fR
  1584. .RS 4
  1585. If this variable is set, the default reference backend format for new repositories will be set to this value\&. The default is "files"\&. See
  1586. \fB\-\-ref\-format\fR
  1587. in
  1588. \fBgit-init\fR(1)\&.
  1589. .RE
  1590. .SS "Git Commits"
  1591. .PP
  1592. \fBGIT_AUTHOR_NAME\fR
  1593. .RS 4
  1594. The human\-readable name used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
  1595. \fBuser\&.name\fR
  1596. and
  1597. \fBauthor\&.name\fR
  1598. configuration settings\&.
  1599. .RE
  1600. .PP
  1601. \fBGIT_AUTHOR_EMAIL\fR
  1602. .RS 4
  1603. The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
  1604. \fBuser\&.email\fR
  1605. and
  1606. \fBauthor\&.email\fR
  1607. configuration settings\&.
  1608. .RE
  1609. .PP
  1610. \fBGIT_AUTHOR_DATE\fR
  1611. .RS 4
  1612. The date used for the author identity when creating commit or tag objects, or when writing reflogs\&. See
  1613. \fBgit-commit\fR(1)
  1614. for valid formats\&.
  1615. .RE
  1616. .PP
  1617. \fBGIT_COMMITTER_NAME\fR
  1618. .RS 4
  1619. The human\-readable name used in the committer identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
  1620. \fBuser\&.name\fR
  1621. and
  1622. \fBcommitter\&.name\fR
  1623. configuration settings\&.
  1624. .RE
  1625. .PP
  1626. \fBGIT_COMMITTER_EMAIL\fR
  1627. .RS 4
  1628. The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
  1629. \fBuser\&.email\fR
  1630. and
  1631. \fBcommitter\&.email\fR
  1632. configuration settings\&.
  1633. .RE
  1634. .PP
  1635. \fBGIT_COMMITTER_DATE\fR
  1636. .RS 4
  1637. The date used for the committer identity when creating commit or tag objects, or when writing reflogs\&. See
  1638. \fBgit-commit\fR(1)
  1639. for valid formats\&.
  1640. .RE
  1641. .PP
  1642. \fBEMAIL\fR
  1643. .RS 4
  1644. The email address used in the author and committer identities if no other relevant environment variable or configuration setting has been set\&.
  1645. .RE
  1646. .SS "Git Diffs"
  1647. .PP
  1648. \fBGIT_DIFF_OPTS\fR
  1649. .RS 4
  1650. Only valid setting is "\-\-unified=??" or "\-u??" to set the number of context lines shown when a unified diff is created\&. This takes precedence over any "\-U" or "\-\-unified" option value passed on the Git diff command line\&.
  1651. .RE
  1652. .PP
  1653. \fBGIT_EXTERNAL_DIFF\fR
  1654. .RS 4
  1655. When the environment variable
  1656. \fBGIT_EXTERNAL_DIFF\fR
  1657. is set, the program named by it is called to generate diffs, and Git does not use its builtin diff machinery\&. For a path that is added, removed, or modified,
  1658. \fBGIT_EXTERNAL_DIFF\fR
  1659. is called with 7 parameters:
  1660. .sp
  1661. .if n \{\
  1662. .RS 4
  1663. .\}
  1664. .nf
  1665. path old\-file old\-hex old\-mode new\-file new\-hex new\-mode
  1666. .fi
  1667. .if n \{\
  1668. .RE
  1669. .\}
  1670. .sp
  1671. where:
  1672. .RE
  1673. .PP
  1674. <old|new>\-file
  1675. .RS 4
  1676. are files GIT_EXTERNAL_DIFF can use to read the contents of <old|new>,
  1677. .RE
  1678. .PP
  1679. <old|new>\-hex
  1680. .RS 4
  1681. are the 40\-hexdigit SHA\-1 hashes,
  1682. .RE
  1683. .PP
  1684. <old|new>\-mode
  1685. .RS 4
  1686. are the octal representation of the file modes\&.
  1687. .sp
  1688. The file parameters can point at the user\(cqs working file (e\&.g\&.
  1689. \fBnew\-file\fR
  1690. in "git\-diff\-files"),
  1691. \fB/dev/null\fR
  1692. (e\&.g\&.
  1693. \fBold\-file\fR
  1694. when a new file is added), or a temporary file (e\&.g\&.
  1695. \fBold\-file\fR
  1696. in the index)\&.
  1697. \fBGIT_EXTERNAL_DIFF\fR
  1698. should not worry about unlinking the temporary file \(em it is removed when
  1699. \fBGIT_EXTERNAL_DIFF\fR
  1700. exits\&.
  1701. .sp
  1702. For a path that is unmerged,
  1703. \fBGIT_EXTERNAL_DIFF\fR
  1704. is called with 1 parameter, <path>\&.
  1705. .sp
  1706. For each path
  1707. \fBGIT_EXTERNAL_DIFF\fR
  1708. is called, two environment variables,
  1709. \fBGIT_DIFF_PATH_COUNTER\fR
  1710. and
  1711. \fBGIT_DIFF_PATH_TOTAL\fR
  1712. are set\&.
  1713. .RE
  1714. .PP
  1715. \fBGIT_EXTERNAL_DIFF_TRUST_EXIT_CODE\fR
  1716. .RS 4
  1717. If this Boolean environment variable is set to true then the
  1718. \fBGIT_EXTERNAL_DIFF\fR
  1719. command is expected to return exit code 0 if it considers the input files to be equal or 1 if it considers them to be different, like
  1720. \fBdiff\fR(\fB1\fR)\&. If it is set to false, which is the default, then the command is expected to return exit code 0 regardless of equality\&. Any other exit code causes Git to report a fatal error\&.
  1721. .RE
  1722. .PP
  1723. \fBGIT_DIFF_PATH_COUNTER\fR
  1724. .RS 4
  1725. A 1\-based counter incremented by one for every path\&.
  1726. .RE
  1727. .PP
  1728. \fBGIT_DIFF_PATH_TOTAL\fR
  1729. .RS 4
  1730. The total number of paths\&.
  1731. .RE
  1732. .SS "other"
  1733. .PP
  1734. \fBGIT_MERGE_VERBOSITY\fR
  1735. .RS 4
  1736. A number controlling the amount of output shown by the recursive merge strategy\&. Overrides merge\&.verbosity\&. See
  1737. \fBgit-merge\fR(1)
  1738. .RE
  1739. .PP
  1740. \fBGIT_PAGER\fR
  1741. .RS 4
  1742. This environment variable overrides
  1743. \fB$PAGER\fR\&. If it is set to an empty string or to the value "cat", Git will not launch a pager\&. See also the
  1744. \fBcore\&.pager\fR
  1745. option in
  1746. \fBgit-config\fR(1)\&.
  1747. .RE
  1748. .PP
  1749. \fBGIT_PROGRESS_DELAY\fR
  1750. .RS 4
  1751. A number controlling how many seconds to delay before showing optional progress indicators\&. Defaults to 2\&.
  1752. .RE
  1753. .PP
  1754. \fBGIT_EDITOR\fR
  1755. .RS 4
  1756. This environment variable overrides
  1757. \fB$EDITOR\fR
  1758. and
  1759. \fB$VISUAL\fR\&. It is used by several Git commands when, on interactive mode, an editor is to be launched\&. See also
  1760. \fBgit-var\fR(1)
  1761. and the
  1762. \fBcore\&.editor\fR
  1763. option in
  1764. \fBgit-config\fR(1)\&.
  1765. .RE
  1766. .PP
  1767. \fBGIT_SEQUENCE_EDITOR\fR
  1768. .RS 4
  1769. This environment variable overrides the configured Git editor when editing the todo list of an interactive rebase\&. See also
  1770. \fBgit-rebase\fR(1)
  1771. and the
  1772. \fBsequence\&.editor\fR
  1773. option in
  1774. \fBgit-config\fR(1)\&.
  1775. .RE
  1776. .PP
  1777. \fBGIT_SSH\fR, \fBGIT_SSH_COMMAND\fR
  1778. .RS 4
  1779. If either of these environment variables is set then
  1780. \fIgit fetch\fR
  1781. and
  1782. \fIgit push\fR
  1783. will use the specified command instead of
  1784. \fIssh\fR
  1785. when they need to connect to a remote system\&. The command\-line parameters passed to the configured command are determined by the ssh variant\&. See
  1786. \fBssh\&.variant\fR
  1787. option in
  1788. \fBgit-config\fR(1)
  1789. for details\&.
  1790. .sp
  1791. \fB$GIT_SSH_COMMAND\fR
  1792. takes precedence over
  1793. \fB$GIT_SSH\fR, and is interpreted by the shell, which allows additional arguments to be included\&.
  1794. \fB$GIT_SSH\fR
  1795. on the other hand must be just the path to a program (which can be a wrapper shell script, if additional arguments are needed)\&.
  1796. .sp
  1797. Usually it is easier to configure any desired options through your personal \&.\fBssh/config\fR
  1798. file\&. Please consult your ssh documentation for further details\&.
  1799. .RE
  1800. .PP
  1801. \fBGIT_SSH_VARIANT\fR
  1802. .RS 4
  1803. If this environment variable is set, it overrides Git\(cqs autodetection whether
  1804. \fBGIT_SSH\fR/\fBGIT_SSH_COMMAND\fR/\fBcore\&.sshCommand\fR
  1805. refer to OpenSSH, plink or tortoiseplink\&. This variable overrides the config setting
  1806. \fBssh\&.variant\fR
  1807. that serves the same purpose\&.
  1808. .RE
  1809. .PP
  1810. \fBGIT_SSL_NO_VERIFY\fR
  1811. .RS 4
  1812. Setting and exporting this environment variable to any value tells Git not to verify the SSL certificate when fetching or pushing over HTTPS\&.
  1813. .RE
  1814. .PP
  1815. \fBGIT_ATTR_SOURCE\fR
  1816. .RS 4
  1817. Sets the treeish that gitattributes will be read from\&.
  1818. .RE
  1819. .PP
  1820. \fBGIT_ASKPASS\fR
  1821. .RS 4
  1822. If this environment variable is set, then Git commands which need to acquire passwords or passphrases (e\&.g\&. for HTTP or IMAP authentication) will call this program with a suitable prompt as command\-line argument and read the password from its STDOUT\&. See also the
  1823. \fBcore\&.askPass\fR
  1824. option in
  1825. \fBgit-config\fR(1)\&.
  1826. .RE
  1827. .PP
  1828. \fBGIT_TERMINAL_PROMPT\fR
  1829. .RS 4
  1830. If this Boolean environment variable is set to false, git will not prompt on the terminal (e\&.g\&., when asking for HTTP authentication)\&.
  1831. .RE
  1832. .PP
  1833. \fBGIT_CONFIG_GLOBAL\fR, \fBGIT_CONFIG_SYSTEM\fR
  1834. .RS 4
  1835. Take the configuration from the given files instead from global or system\-level configuration files\&. If
  1836. \fBGIT_CONFIG_SYSTEM\fR
  1837. is set, the system config file defined at build time (usually
  1838. \fB/etc/gitconfig\fR) will not be read\&. Likewise, if
  1839. \fBGIT_CONFIG_GLOBAL\fR
  1840. is set, neither
  1841. \fB$HOME/\&.gitconfig\fR
  1842. nor
  1843. \fB$XDG_CONFIG_HOME/git/config\fR
  1844. will be read\&. Can be set to
  1845. \fB/dev/null\fR
  1846. to skip reading configuration files of the respective level\&.
  1847. .RE
  1848. .PP
  1849. \fBGIT_CONFIG_NOSYSTEM\fR
  1850. .RS 4
  1851. Whether to skip reading settings from the system\-wide
  1852. \fB$\fR(\fBprefix\fR)\fB/etc/gitconfig\fR
  1853. file\&. This Boolean environment variable can be used along with
  1854. \fB$HOME\fR
  1855. and
  1856. \fB$XDG_CONFIG_HOME\fR
  1857. to create a predictable environment for a picky script, or you can set it to true to temporarily avoid using a buggy
  1858. \fB/etc/gitconfig\fR
  1859. file while waiting for someone with sufficient permissions to fix it\&.
  1860. .RE
  1861. .PP
  1862. \fBGIT_FLUSH\fR
  1863. .RS 4
  1864. If this Boolean environment variable is set to true, then commands such as
  1865. \fIgit blame\fR
  1866. (in incremental mode),
  1867. \fIgit rev\-list\fR,
  1868. \fIgit log\fR,
  1869. \fIgit check\-attr\fR
  1870. and
  1871. \fIgit check\-ignore\fR
  1872. will force a flush of the output stream after each record have been flushed\&. If this variable is set to false, the output of these commands will be done using completely buffered I/O\&. If this environment variable is not set, Git will choose buffered or record\-oriented flushing based on whether stdout appears to be redirected to a file or not\&.
  1873. .RE
  1874. .PP
  1875. \fBGIT_TRACE\fR
  1876. .RS 4
  1877. Enables general trace messages, e\&.g\&. alias expansion, built\-in command execution and external command execution\&.
  1878. .sp
  1879. If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
  1880. .sp
  1881. If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor\&.
  1882. .sp
  1883. Alternatively, if the variable is set to an absolute path (starting with a
  1884. \fI/\fR
  1885. character), Git will interpret this as a file path and will try to append the trace messages to it\&.
  1886. .sp
  1887. Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
  1888. .RE
  1889. .PP
  1890. \fBGIT_TRACE_FSMONITOR\fR
  1891. .RS 4
  1892. Enables trace messages for the filesystem monitor extension\&. See
  1893. \fBGIT_TRACE\fR
  1894. for available trace output options\&.
  1895. .RE
  1896. .PP
  1897. \fBGIT_TRACE_PACK_ACCESS\fR
  1898. .RS 4
  1899. Enables trace messages for all accesses to any packs\&. For each access, the pack file name and an offset in the pack is recorded\&. This may be helpful for troubleshooting some pack\-related performance problems\&. See
  1900. \fBGIT_TRACE\fR
  1901. for available trace output options\&.
  1902. .RE
  1903. .PP
  1904. \fBGIT_TRACE_PACKET\fR
  1905. .RS 4
  1906. Enables trace messages for all packets coming in or out of a given program\&. This can help with debugging object negotiation or other protocol issues\&. Tracing is turned off at a packet starting with "PACK" (but see
  1907. \fBGIT_TRACE_PACKFILE\fR
  1908. below)\&. See
  1909. \fBGIT_TRACE\fR
  1910. for available trace output options\&.
  1911. .RE
  1912. .PP
  1913. \fBGIT_TRACE_PACKFILE\fR
  1914. .RS 4
  1915. Enables tracing of packfiles sent or received by a given program\&. Unlike other trace output, this trace is verbatim: no headers, and no quoting of binary data\&. You almost certainly want to direct into a file (e\&.g\&.,
  1916. \fBGIT_TRACE_PACKFILE=/tmp/my\&.pack\fR) rather than displaying it on the terminal or mixing it with other trace output\&.
  1917. .sp
  1918. Note that this is currently only implemented for the client side of clones and fetches\&.
  1919. .RE
  1920. .PP
  1921. \fBGIT_TRACE_PERFORMANCE\fR
  1922. .RS 4
  1923. Enables performance related trace messages, e\&.g\&. total execution time of each Git command\&. See
  1924. \fBGIT_TRACE\fR
  1925. for available trace output options\&.
  1926. .RE
  1927. .PP
  1928. \fBGIT_TRACE_REFS\fR
  1929. .RS 4
  1930. Enables trace messages for operations on the ref database\&. See
  1931. \fBGIT_TRACE\fR
  1932. for available trace output options\&.
  1933. .RE
  1934. .PP
  1935. \fBGIT_TRACE_SETUP\fR
  1936. .RS 4
  1937. Enables trace messages printing the \&.git, working tree and current working directory after Git has completed its setup phase\&. See
  1938. \fBGIT_TRACE\fR
  1939. for available trace output options\&.
  1940. .RE
  1941. .PP
  1942. \fBGIT_TRACE_SHALLOW\fR
  1943. .RS 4
  1944. Enables trace messages that can help debugging fetching / cloning of shallow repositories\&. See
  1945. \fBGIT_TRACE\fR
  1946. for available trace output options\&.
  1947. .RE
  1948. .PP
  1949. \fBGIT_TRACE_CURL\fR
  1950. .RS 4
  1951. Enables a curl full trace dump of all incoming and outgoing data, including descriptive information, of the git transport protocol\&. This is similar to doing curl
  1952. \fB\-\-trace\-ascii\fR
  1953. on the command line\&. See
  1954. \fBGIT_TRACE\fR
  1955. for available trace output options\&.
  1956. .RE
  1957. .PP
  1958. \fBGIT_TRACE_CURL_NO_DATA\fR
  1959. .RS 4
  1960. When a curl trace is enabled (see
  1961. \fBGIT_TRACE_CURL\fR
  1962. above), do not dump data (that is, only dump info lines and headers)\&.
  1963. .RE
  1964. .PP
  1965. \fBGIT_TRACE2\fR
  1966. .RS 4
  1967. Enables more detailed trace messages from the "trace2" library\&. Output from
  1968. \fBGIT_TRACE2\fR
  1969. is a simple text\-based format for human readability\&.
  1970. .sp
  1971. If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
  1972. .sp
  1973. If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor\&.
  1974. .sp
  1975. Alternatively, if the variable is set to an absolute path (starting with a
  1976. \fI/\fR
  1977. character), Git will interpret this as a file path and will try to append the trace messages to it\&. If the path already exists and is a directory, the trace messages will be written to files (one per process) in that directory, named according to the last component of the SID and an optional counter (to avoid filename collisions)\&.
  1978. .sp
  1979. In addition, if the variable is set to
  1980. \fBaf_unix:\fR[\fI<socket\-type>\fR\fB:\fR]\fI<absolute\-pathname>\fR, Git will try to open the path as a Unix Domain Socket\&. The socket type can be either
  1981. \fBstream\fR
  1982. or
  1983. \fBdgram\fR\&.
  1984. .sp
  1985. Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
  1986. .sp
  1987. See
  1988. \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
  1989. for full details\&.
  1990. .RE
  1991. .PP
  1992. \fBGIT_TRACE2_EVENT\fR
  1993. .RS 4
  1994. This setting writes a JSON\-based format that is suited for machine interpretation\&. See
  1995. \fBGIT_TRACE2\fR
  1996. for available trace output options and
  1997. \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
  1998. for full details\&.
  1999. .RE
  2000. .PP
  2001. \fBGIT_TRACE2_PERF\fR
  2002. .RS 4
  2003. In addition to the text\-based messages available in
  2004. \fBGIT_TRACE2\fR, this setting writes a column\-based format for understanding nesting regions\&. See
  2005. \fBGIT_TRACE2\fR
  2006. for available trace output options and
  2007. \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
  2008. for full details\&.
  2009. .RE
  2010. .PP
  2011. \fBGIT_TRACE_REDACT\fR
  2012. .RS 4
  2013. By default, when tracing is activated, Git redacts the values of cookies, the "Authorization:" header, the "Proxy\-Authorization:" header and packfile URIs\&. Set this Boolean environment variable to false to prevent this redaction\&.
  2014. .RE
  2015. .PP
  2016. \fBGIT_NO_REPLACE_OBJECTS\fR
  2017. .RS 4
  2018. Setting and exporting this environment variable tells Git to ignore replacement refs and do not replace Git objects\&.
  2019. .RE
  2020. .PP
  2021. \fBGIT_LITERAL_PATHSPECS\fR
  2022. .RS 4
  2023. Setting this Boolean environment variable to true will cause Git to treat all pathspecs literally, rather than as glob patterns\&. For example, running
  2024. \fBGIT_LITERAL_PATHSPECS=1\fR
  2025. \fBgit\fR
  2026. \fBlog\fR
  2027. \fB\-\-\fR
  2028. \*(Aq*\&.\fBc\fR\*(Aq will search for commits that touch the path *\&.\fBc\fR, not any paths that the glob *\&.\fBc\fR
  2029. matches\&. You might want this if you are feeding literal paths to Git (e\&.g\&., paths previously given to you by
  2030. \fBgit\fR
  2031. \fBls\-tree\fR,
  2032. \fB\-\-raw\fR
  2033. diff output, etc)\&.
  2034. .RE
  2035. .PP
  2036. \fBGIT_GLOB_PATHSPECS\fR
  2037. .RS 4
  2038. Setting this Boolean environment variable to true will cause Git to treat all pathspecs as glob patterns (aka "glob" magic)\&.
  2039. .RE
  2040. .PP
  2041. \fBGIT_NOGLOB_PATHSPECS\fR
  2042. .RS 4
  2043. Setting this Boolean environment variable to true will cause Git to treat all pathspecs as literal (aka "literal" magic)\&.
  2044. .RE
  2045. .PP
  2046. \fBGIT_ICASE_PATHSPECS\fR
  2047. .RS 4
  2048. Setting this Boolean environment variable to true will cause Git to treat all pathspecs as case\-insensitive\&.
  2049. .RE
  2050. .PP
  2051. \fBGIT_NO_LAZY_FETCH\fR
  2052. .RS 4
  2053. Setting this Boolean environment variable to true tells Git not to lazily fetch missing objects from the promisor remote on demand\&.
  2054. .RE
  2055. .PP
  2056. \fBGIT_REFLOG_ACTION\fR
  2057. .RS 4
  2058. When a ref is updated, reflog entries are created to keep track of the reason why the ref was updated (which is typically the name of the high\-level command that updated the ref), in addition to the old and new values of the ref\&. A scripted Porcelain command can use set_reflog_action helper function in
  2059. \fBgit\-sh\-setup\fR
  2060. to set its name to this variable when it is invoked as the top level command by the end user, to be recorded in the body of the reflog\&.
  2061. .RE
  2062. .PP
  2063. \fBGIT_REF_PARANOIA\fR
  2064. .RS 4
  2065. If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating over lists of refs\&. Normally Git will try to include any such refs, which may cause some operations to fail\&. This is usually preferable, as potentially destructive operations (e\&.g\&.,
  2066. \fBgit-prune\fR(1)) are better off aborting rather than ignoring broken refs (and thus considering the history they point to as not worth saving)\&. The default value is
  2067. \fB1\fR
  2068. (i\&.e\&., be paranoid about detecting and aborting all operations)\&. You should not normally need to set this to
  2069. \fB0\fR, but it may be useful when trying to salvage data from a corrupted repository\&.
  2070. .RE
  2071. .PP
  2072. \fBGIT_COMMIT_GRAPH_PARANOIA\fR
  2073. .RS 4
  2074. When loading a commit object from the commit\-graph, Git performs an existence check on the object in the object database\&. This is done to avoid issues with stale commit\-graphs that contain references to already\-deleted commits, but comes with a performance penalty\&.
  2075. .sp
  2076. The default is "false", which disables the aforementioned behavior\&. Setting this to "true" enables the existence check so that stale commits will never be returned from the commit\-graph at the cost of performance\&.
  2077. .RE
  2078. .PP
  2079. \fBGIT_ALLOW_PROTOCOL\fR
  2080. .RS 4
  2081. If set to a colon\-separated list of protocols, behave as if
  2082. \fBprotocol\&.allow\fR
  2083. is set to
  2084. \fBnever\fR, and each of the listed protocols has
  2085. \fBprotocol\&.\fR\fI<name>\fR\fB\&.allow\fR
  2086. set to
  2087. \fBalways\fR
  2088. (overriding any existing configuration)\&. See the description of
  2089. \fBprotocol\&.allow\fR
  2090. in
  2091. \fBgit-config\fR(1)
  2092. for more details\&.
  2093. .RE
  2094. .PP
  2095. \fBGIT_PROTOCOL_FROM_USER\fR
  2096. .RS 4
  2097. Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are configured to the
  2098. \fBuser\fR
  2099. state\&. This is useful to restrict recursive submodule initialization from an untrusted repository or for programs which feed potentially\-untrusted URLS to git commands\&. See
  2100. \fBgit-config\fR(1)
  2101. for more details\&.
  2102. .RE
  2103. .PP
  2104. \fBGIT_PROTOCOL\fR
  2105. .RS 4
  2106. For internal use only\&. Used in handshaking the wire protocol\&. Contains a colon
  2107. \fI:\fR
  2108. separated list of keys with optional values
  2109. \fI<key>[=<value>]\fR\&. Presence of unknown keys and values must be ignored\&.
  2110. .sp
  2111. Note that servers may need to be configured to allow this variable to pass over some transports\&. It will be propagated automatically when accessing local repositories (i\&.e\&.,
  2112. \fBfile://\fR
  2113. or a filesystem path), as well as over the
  2114. \fBgit://\fR
  2115. protocol\&. For git\-over\-http, it should work automatically in most configurations, but see the discussion in
  2116. \fBgit-http-backend\fR(1)\&. For git\-over\-ssh, the ssh server may need to be configured to allow clients to pass this variable (e\&.g\&., by using
  2117. \fBAcceptEnv\fR
  2118. \fBGIT_PROTOCOL\fR
  2119. with OpenSSH)\&.
  2120. .sp
  2121. This configuration is optional\&. If the variable is not propagated, then clients will fall back to the original "v0" protocol (but may miss out on some performance improvements or features)\&. This variable currently only affects clones and fetches; it is not yet used for pushes (but may be in the future)\&.
  2122. .RE
  2123. .PP
  2124. \fBGIT_OPTIONAL_LOCKS\fR
  2125. .RS 4
  2126. If this Boolean environment variable is set to false, Git will complete any requested operation without performing any optional sub\-operations that require taking a lock\&. For example, this will prevent
  2127. \fBgit\fR
  2128. \fBstatus\fR
  2129. from refreshing the index as a side effect\&. This is useful for processes running in the background which do not want to cause lock contention with other operations on the repository\&. Defaults to
  2130. \fB1\fR\&.
  2131. .RE
  2132. .PP
  2133. \fBGIT_REDIRECT_STDIN\fR, \fBGIT_REDIRECT_STDOUT\fR, \fBGIT_REDIRECT_STDERR\fR
  2134. .RS 4
  2135. Windows\-only: allow redirecting the standard input/output/error handles to paths specified by the environment variables\&. This is particularly useful in multi\-threaded applications where the canonical way to pass standard handles via
  2136. \fBCreateProcess\fR() is not an option because it would require the handles to be marked inheritable (and consequently
  2137. \fBevery\fR
  2138. spawned process would inherit them, possibly blocking regular Git operations)\&. The primary intended use case is to use named pipes for communication (e\&.g\&. \e\e\&.\epipe\emy\-git\-stdin\-123)\&.
  2139. .sp
  2140. Two special values are supported:
  2141. \fBoff\fR
  2142. will simply close the corresponding standard handle, and if
  2143. \fBGIT_REDIRECT_STDERR\fR
  2144. is
  2145. \fB2\fR>&1, standard error will be redirected to the same handle as standard output\&.
  2146. .RE
  2147. .PP
  2148. \fBGIT_PRINT_SHA1_ELLIPSIS\fR (deprecated)
  2149. .RS 4
  2150. If set to
  2151. \fByes\fR, print an ellipsis following an (abbreviated) SHA\-1 value\&. This affects indications of detached HEADs (\fBgit-checkout\fR(1)) and the raw diff output (\fBgit-diff\fR(1))\&. Printing an ellipsis in the cases mentioned is no longer considered adequate and support for it is likely to be removed in the foreseeable future (along with the variable)\&.
  2152. .RE
  2153. .PP
  2154. \fBGIT_ADVICE\fR
  2155. .RS 4
  2156. If set to
  2157. \fB0\fR, then disable all advice messages\&. These messages are intended to provide hints to human users that may help them get out of problematic situations or take advantage of new features\&. Users can disable individual messages using the
  2158. \fBadvice\&.\fR* config keys\&. These messages may be disruptive to tools that execute Git processes, so this variable is available to disable the messages\&. (The
  2159. \fB\-\-no\-advice\fR
  2160. global option is also available, but old Git versions may fail when this option is not understood\&. The environment variable will be ignored by Git versions that do not understand it\&.)
  2161. .RE
  2162. .SH "DISCUSSION"
  2163. .sp
  2164. More detail on the following is available from the \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[3]\d\s+2 and \fBgitcore-tutorial\fR(7)\&.
  2165. .sp
  2166. A Git project normally consists of a working directory with a "\&.git" subdirectory at the top level\&. The \&.git directory contains, among other things, a compressed object database representing the complete history of the project, an "index" file which links that history to the current contents of the working tree, and named pointers into that history such as tags and branch heads\&.
  2167. .sp
  2168. The object database contains objects of three main types: blobs, which hold file data; trees, which point to blobs and other trees to build up directory hierarchies; and commits, which each reference a single tree and some number of parent commits\&.
  2169. .sp
  2170. The commit, equivalent to what other systems call a "changeset" or "version", represents a step in the project\(cqs history, and each parent represents an immediately preceding step\&. Commits with more than one parent represent merges of independent lines of development\&.
  2171. .sp
  2172. All objects are named by the SHA\-1 hash of their contents, normally written as a string of 40 hex digits\&. Such names are globally unique\&. The entire history leading up to a commit can be vouched for by signing just that commit\&. A fourth object type, the tag, is provided for this purpose\&.
  2173. .sp
  2174. When first created, objects are stored in individual files, but for efficiency may later be compressed together into "pack files"\&.
  2175. .sp
  2176. Named pointers called refs mark interesting points in history\&. A ref may contain the SHA\-1 name of an object or the name of another ref (the latter is called a "symbolic ref")\&. Refs with names beginning \fBrefs/head/\fR contain the SHA\-1 name of the most recent commit (or "head") of a branch under development\&. SHA\-1 names of tags of interest are stored under \fBrefs/tags/\fR\&. A symbolic ref named \fBHEAD\fR contains the name of the currently checked\-out branch\&.
  2177. .sp
  2178. The index file is initialized with a list of all paths and, for each path, a blob object and a set of attributes\&. The blob object represents the contents of the file as of the head of the current branch\&. The attributes (last modified time, size, etc\&.) are taken from the corresponding file in the working tree\&. Subsequent changes to the working tree can be found by comparing these attributes\&. The index may be updated with new content, and new commits may be created from the content stored in the index\&.
  2179. .sp
  2180. The index is also capable of storing multiple entries (called "stages") for a given pathname\&. These stages are used to hold the various unmerged version of a file when a merge is in progress\&.
  2181. .SH "SECURITY"
  2182. .sp
  2183. Some configuration options and hook files may cause Git to run arbitrary shell commands\&. Because configuration and hooks are not copied using \fBgit\fR \fBclone\fR, it is generally safe to clone remote repositories with untrusted content, inspect them with \fBgit\fR \fBlog\fR, and so on\&.
  2184. .sp
  2185. However, it is not safe to run Git commands in a \&.\fBgit\fR directory (or the working tree that surrounds it) when that \&.\fBgit\fR directory itself comes from an untrusted source\&. The commands in its config and hooks are executed in the usual way\&.
  2186. .sp
  2187. By default, Git will refuse to run when the repository is owned by someone other than the user running the command\&. See the entry for \fBsafe\&.directory\fR in \fBgit-config\fR(1)\&. While this can help protect you in a multi\-user environment, note that you can also acquire untrusted repositories that are owned by you (for example, if you extract a zip file or tarball from an untrusted source)\&. In such cases, you\(cqd need to "sanitize" the untrusted repository first\&.
  2188. .sp
  2189. If you have an untrusted \&.\fBgit\fR directory, you should first clone it with \fBgit\fR \fBclone\fR \fB\-\-no\-local\fR to obtain a clean copy\&. Git does restrict the set of options and hooks that will be run by \fBupload\-pack\fR, which handles the server side of a clone or fetch, but beware that the surface area for attack against \fBupload\-pack\fR is large, so this does carry some risk\&. The safest thing is to serve the repository as an unprivileged user (either via \fBgit-daemon\fR(1), ssh, or using other tools to change user ids)\&. See the discussion in the \fBSECURITY\fR section of \fBgit-upload-pack\fR(1)\&.
  2190. .SH "FURTHER DOCUMENTATION"
  2191. .sp
  2192. See the references in the "description" section to get started using Git\&. The following is probably more detail than necessary for a first\-time user\&.
  2193. .sp
  2194. The \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[3]\d\s+2 and \fBgitcore-tutorial\fR(7) both provide introductions to the underlying Git architecture\&.
  2195. .sp
  2196. See \fBgitworkflows\fR(7) for an overview of recommended workflows\&.
  2197. .sp
  2198. See also the \m[blue]\fBhowto\fR\m[]\&\s-2\u[4]\d\s+2 documents for some useful examples\&.
  2199. .sp
  2200. The internals are documented in the \m[blue]\fBGit API documentation\fR\m[]\&\s-2\u[5]\d\s+2\&.
  2201. .sp
  2202. Users migrating from CVS may also want to read \fBgitcvs-migration\fR(7)\&.
  2203. .SH "AUTHORS"
  2204. .sp
  2205. Git was started by Linus Torvalds, and is currently maintained by Junio C Hamano\&. Numerous contributions have come from the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[6]\d\s+2>\&. \m[blue]\fBhttps://openhub\&.net/p/git/contributors/summary\fR\m[] gives you a more complete list of contributors\&.
  2206. .sp
  2207. If you have a clone of git\&.git itself, the output of \fBgit-shortlog\fR(1) and \fBgit-blame\fR(1) can show you the authors for specific parts of the project\&.
  2208. .SH "REPORTING BUGS"
  2209. .sp
  2210. Report bugs to the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[6]\d\s+2> where the development and maintenance is primarily done\&. You do not have to be subscribed to the list to send a message there\&. See the list archive at \m[blue]\fBhttps://lore\&.kernel\&.org/git\fR\m[] for previous bug reports and other discussions\&.
  2211. .sp
  2212. Issues which are security relevant should be disclosed privately to the Git Security mailing list <\m[blue]\fBgit\-security@googlegroups\&.com\fR\m[]\&\s-2\u[7]\d\s+2>\&.
  2213. .SH "SEE ALSO"
  2214. .sp
  2215. \fBgittutorial\fR(7), \fBgittutorial-2\fR(7), \fBgiteveryday\fR(7), \fBgitcvs-migration\fR(7), \fBgitglossary\fR(7), \fBgitcore-tutorial\fR(7), \fBgitcli\fR(7), \m[blue]\fBThe Git User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2, \fBgitworkflows\fR(7)
  2216. .SH "GIT"
  2217. .sp
  2218. Part of the \fBgit\fR(1) suite
  2219. .SH "NOTES"
  2220. .IP " 1." 4
  2221. Git User\(cqs Manual
  2222. .RS 4
  2223. \%git-htmldocs/user-manual.html
  2224. .RE
  2225. .IP " 2." 4
  2226. Trace2 documentation
  2227. .RS 4
  2228. \%git-htmldocs/technical/api-trace2.html
  2229. .RE
  2230. .IP " 3." 4
  2231. Git concepts chapter of the user-manual
  2232. .RS 4
  2233. \%git-htmldocs/user-manual.html#git-concepts
  2234. .RE
  2235. .IP " 4." 4
  2236. howto
  2237. .RS 4
  2238. \%git-htmldocs/howto-index.html
  2239. .RE
  2240. .IP " 5." 4
  2241. Git API documentation
  2242. .RS 4
  2243. \%git-htmldocs/technical/api-index.html
  2244. .RE
  2245. .IP " 6." 4
  2246. git@vger.kernel.org
  2247. .RS 4
  2248. \%mailto:git@vger.kernel.org
  2249. .RE
  2250. .IP " 7." 4
  2251. git-security@googlegroups.com
  2252. .RS 4
  2253. \%mailto:git-security@googlegroups.com
  2254. .RE