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-status.1 (26397B)


  1. '\" t
  2. .\" Title: git-status
  3. .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
  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\-STATUS" "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-status \- Show the working tree status
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit status\fR [<options>] [\-\-] [<pathspec>\&...\:]
  36. .fi
  37. .SH "DESCRIPTION"
  38. .sp
  39. Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by \fBgitignore\fR(5))\&. The first are what you \fIwould\fR commit by running \fBgit\fR \fBcommit\fR; the second and third are what you \fIcould\fR commit by running \fIgit add\fR before running \fBgit\fR \fBcommit\fR\&.
  40. .SH "OPTIONS"
  41. .PP
  42. \-s, \-\-short
  43. .RS 4
  44. Give the output in the short\-format\&.
  45. .RE
  46. .PP
  47. \-b, \-\-branch
  48. .RS 4
  49. Show the branch and tracking info even in short\-format\&.
  50. .RE
  51. .PP
  52. \-\-show\-stash
  53. .RS 4
  54. Show the number of entries currently stashed away\&.
  55. .RE
  56. .PP
  57. \-\-porcelain[=<version>]
  58. .RS 4
  59. Give the output in an easy\-to\-parse format for scripts\&. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration\&. See below for details\&.
  60. .sp
  61. The version parameter is used to specify the format version\&. This is optional and defaults to the original version
  62. \fIv1\fR
  63. format\&.
  64. .RE
  65. .PP
  66. \-\-long
  67. .RS 4
  68. Give the output in the long\-format\&. This is the default\&.
  69. .RE
  70. .PP
  71. \-v, \-\-verbose
  72. .RS 4
  73. In addition to the names of files that have been changed, also show the textual changes that are staged to be committed (i\&.e\&., like the output of
  74. \fBgit\fR
  75. \fBdiff\fR
  76. \fB\-\-cached\fR)\&. If
  77. \fB\-v\fR
  78. is specified twice, then also show the changes in the working tree that have not yet been staged (i\&.e\&., like the output of
  79. \fBgit\fR
  80. \fBdiff\fR)\&.
  81. .RE
  82. .PP
  83. \-u[<mode>], \-\-untracked\-files[=<mode>]
  84. .RS 4
  85. Show untracked files\&.
  86. .sp
  87. The mode parameter is used to specify the handling of untracked files\&. It is optional: it defaults to
  88. \fIall\fR, and if specified, it must be stuck to the option (e\&.g\&.
  89. \fB\-uno\fR, but not
  90. \fB\-u\fR
  91. \fBno\fR)\&.
  92. .sp
  93. The possible options are:
  94. .sp
  95. .RS 4
  96. .ie n \{\
  97. \h'-04'\(bu\h'+03'\c
  98. .\}
  99. .el \{\
  100. .sp -1
  101. .IP \(bu 2.3
  102. .\}
  103. \fIno\fR
  104. \- Show no untracked files\&.
  105. .RE
  106. .sp
  107. .RS 4
  108. .ie n \{\
  109. \h'-04'\(bu\h'+03'\c
  110. .\}
  111. .el \{\
  112. .sp -1
  113. .IP \(bu 2.3
  114. .\}
  115. \fInormal\fR
  116. \- Shows untracked files and directories\&.
  117. .RE
  118. .sp
  119. .RS 4
  120. .ie n \{\
  121. \h'-04'\(bu\h'+03'\c
  122. .\}
  123. .el \{\
  124. .sp -1
  125. .IP \(bu 2.3
  126. .\}
  127. \fIall\fR
  128. \- Also shows individual files in untracked directories\&.
  129. .RE
  130. .sp
  131. When
  132. \fB\-u\fR
  133. option is not used, untracked files and directories are shown (i\&.e\&. the same as specifying
  134. \fBnormal\fR), to help you avoid forgetting to add newly created files\&. Because it takes extra work to find untracked files in the filesystem, this mode may take some time in a large working tree\&. Consider enabling untracked cache and split index if supported (see
  135. \fBgit\fR
  136. \fBupdate\-index\fR
  137. \fB\-\-untracked\-cache\fR
  138. and
  139. \fBgit\fR
  140. \fBupdate\-index\fR
  141. \fB\-\-split\-index\fR), Otherwise you can use
  142. \fBno\fR
  143. to have
  144. \fBgit\fR
  145. \fBstatus\fR
  146. return more quickly without showing untracked files\&. All usual spellings for Boolean value
  147. \fBtrue\fR
  148. are taken as
  149. \fBnormal\fR
  150. and
  151. \fBfalse\fR
  152. as
  153. \fBno\fR\&.
  154. .sp
  155. The default can be changed using the status\&.showUntrackedFiles configuration variable documented in
  156. \fBgit-config\fR(1)\&.
  157. .RE
  158. .PP
  159. \-\-ignore\-submodules[=<when>]
  160. .RS 4
  161. Ignore changes to submodules when looking for changes\&. <when> can be either "none", "untracked", "dirty" or "all", which is the default\&. Using "none" will consider the submodule modified when it either contains untracked or modified files or its HEAD differs from the commit recorded in the superproject and can be used to override any settings of the
  162. \fIignore\fR
  163. option in
  164. \fBgit-config\fR(1)
  165. or
  166. \fBgitmodules\fR(5)\&. When "untracked" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content)\&. Using "dirty" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown (this was the behavior before 1\&.7\&.0)\&. Using "all" hides all changes to submodules (and suppresses the output of submodule summaries when the config option
  167. \fBstatus\&.submoduleSummary\fR
  168. is set)\&.
  169. .RE
  170. .PP
  171. \-\-ignored[=<mode>]
  172. .RS 4
  173. Show ignored files as well\&.
  174. .sp
  175. The mode parameter is used to specify the handling of ignored files\&. It is optional: it defaults to
  176. \fItraditional\fR\&.
  177. .sp
  178. The possible options are:
  179. .sp
  180. .RS 4
  181. .ie n \{\
  182. \h'-04'\(bu\h'+03'\c
  183. .\}
  184. .el \{\
  185. .sp -1
  186. .IP \(bu 2.3
  187. .\}
  188. \fItraditional\fR
  189. \- Shows ignored files and directories, unless \-\-untracked\-files=all is specified, in which case individual files in ignored directories are displayed\&.
  190. .RE
  191. .sp
  192. .RS 4
  193. .ie n \{\
  194. \h'-04'\(bu\h'+03'\c
  195. .\}
  196. .el \{\
  197. .sp -1
  198. .IP \(bu 2.3
  199. .\}
  200. \fIno\fR
  201. \- Show no ignored files\&.
  202. .RE
  203. .sp
  204. .RS 4
  205. .ie n \{\
  206. \h'-04'\(bu\h'+03'\c
  207. .\}
  208. .el \{\
  209. .sp -1
  210. .IP \(bu 2.3
  211. .\}
  212. \fImatching\fR
  213. \- Shows ignored files and directories matching an ignore pattern\&.
  214. .RE
  215. .sp
  216. When
  217. \fImatching\fR
  218. mode is specified, paths that explicitly match an ignored pattern are shown\&. If a directory matches an ignore pattern, then it is shown, but not paths contained in the ignored directory\&. If a directory does not match an ignore pattern, but all contents are ignored, then the directory is not shown, but all contents are shown\&.
  219. .RE
  220. .PP
  221. \-z
  222. .RS 4
  223. Terminate entries with NUL, instead of LF\&. This implies the
  224. \fB\-\-porcelain=v1\fR
  225. output format if no other format is given\&.
  226. .RE
  227. .PP
  228. \-\-column[=<options>], \-\-no\-column
  229. .RS 4
  230. Display untracked files in columns\&. See configuration variable
  231. \fBcolumn\&.status\fR
  232. for option syntax\&.
  233. \fB\-\-column\fR
  234. and
  235. \fB\-\-no\-column\fR
  236. without options are equivalent to
  237. \fIalways\fR
  238. and
  239. \fInever\fR
  240. respectively\&.
  241. .RE
  242. .PP
  243. \-\-ahead\-behind, \-\-no\-ahead\-behind
  244. .RS 4
  245. Display or do not display detailed ahead/behind counts for the branch relative to its upstream branch\&. Defaults to true\&.
  246. .RE
  247. .PP
  248. \-\-renames, \-\-no\-renames
  249. .RS 4
  250. Turn on/off rename detection regardless of user configuration\&. See also
  251. \fBgit-diff\fR(1)
  252. \fB\-\-no\-renames\fR\&.
  253. .RE
  254. .PP
  255. \-\-find\-renames[=<n>]
  256. .RS 4
  257. Turn on rename detection, optionally setting the similarity threshold\&. See also
  258. \fBgit-diff\fR(1)
  259. \fB\-\-find\-renames\fR\&.
  260. .RE
  261. .PP
  262. <pathspec>\&...\:
  263. .RS 4
  264. See the
  265. \fIpathspec\fR
  266. entry in
  267. \fBgitglossary\fR(7)\&.
  268. .RE
  269. .SH "OUTPUT"
  270. .sp
  271. The output from this command is designed to be used as a commit template comment\&. The default, long format, is designed to be human readable, verbose and descriptive\&. Its contents and format are subject to change at any time\&.
  272. .sp
  273. The paths mentioned in the output, unlike many other Git commands, are made relative to the current directory if you are working in a subdirectory (this is on purpose, to help cutting and pasting)\&. See the status\&.relativePaths config option below\&.
  274. .SS "Short Format"
  275. .sp
  276. In the short\-format, the status of each path is shown as one of these forms
  277. .sp
  278. .if n \{\
  279. .RS 4
  280. .\}
  281. .nf
  282. XY PATH
  283. XY ORIG_PATH \-> PATH
  284. .fi
  285. .if n \{\
  286. .RE
  287. .\}
  288. .sp
  289. where \fBORIG_PATH\fR is where the renamed/copied contents came from\&. \fBORIG_PATH\fR is only shown when the entry is renamed or copied\&. The \fBXY\fR is a two\-letter status code\&.
  290. .sp
  291. The fields (including the \fB\-\fR>) are separated from each other by a single space\&. If a filename contains whitespace or other nonprintable characters, that field will be quoted in the manner of a C string literal: surrounded by ASCII double quote (34) characters, and with interior special characters backslash\-escaped\&.
  292. .sp
  293. There are three different types of states that are shown using this format, and each one uses the \fBXY\fR syntax differently:
  294. .sp
  295. .RS 4
  296. .ie n \{\
  297. \h'-04'\(bu\h'+03'\c
  298. .\}
  299. .el \{\
  300. .sp -1
  301. .IP \(bu 2.3
  302. .\}
  303. When a merge is occurring and the merge was successful, or outside of a merge situation,
  304. \fBX\fR
  305. shows the status of the index and
  306. \fBY\fR
  307. shows the status of the working tree\&.
  308. .RE
  309. .sp
  310. .RS 4
  311. .ie n \{\
  312. \h'-04'\(bu\h'+03'\c
  313. .\}
  314. .el \{\
  315. .sp -1
  316. .IP \(bu 2.3
  317. .\}
  318. When a merge conflict has occurred and has not yet been resolved,
  319. \fBX\fR
  320. and
  321. \fBY\fR
  322. show the state introduced by each head of the merge, relative to the common ancestor\&. These paths are said to be
  323. \fIunmerged\fR\&.
  324. .RE
  325. .sp
  326. .RS 4
  327. .ie n \{\
  328. \h'-04'\(bu\h'+03'\c
  329. .\}
  330. .el \{\
  331. .sp -1
  332. .IP \(bu 2.3
  333. .\}
  334. When a path is untracked,
  335. \fBX\fR
  336. and
  337. \fBY\fR
  338. are always the same, since they are unknown to the index\&. ?? is used for untracked paths\&. Ignored files are not listed unless
  339. \fB\-\-ignored\fR
  340. is used; if it is, ignored files are indicated by !!\&.
  341. .RE
  342. .sp
  343. Note that the term \fImerge\fR here also includes rebases using the default \fB\-\-merge\fR strategy, cherry\-picks, and anything else using the merge machinery\&.
  344. .sp
  345. In the following table, these three classes are shown in separate sections, and these characters are used for \fBX\fR and \fBY\fR fields for the first two sections that show tracked paths:
  346. .sp
  347. .RS 4
  348. .ie n \{\
  349. \h'-04'\(bu\h'+03'\c
  350. .\}
  351. .el \{\
  352. .sp -1
  353. .IP \(bu 2.3
  354. .\}
  355. \*(Aq \*(Aq = unmodified
  356. .RE
  357. .sp
  358. .RS 4
  359. .ie n \{\
  360. \h'-04'\(bu\h'+03'\c
  361. .\}
  362. .el \{\
  363. .sp -1
  364. .IP \(bu 2.3
  365. .\}
  366. \fIM\fR
  367. = modified
  368. .RE
  369. .sp
  370. .RS 4
  371. .ie n \{\
  372. \h'-04'\(bu\h'+03'\c
  373. .\}
  374. .el \{\
  375. .sp -1
  376. .IP \(bu 2.3
  377. .\}
  378. \fIT\fR
  379. = file type changed (regular file, symbolic link or submodule)
  380. .RE
  381. .sp
  382. .RS 4
  383. .ie n \{\
  384. \h'-04'\(bu\h'+03'\c
  385. .\}
  386. .el \{\
  387. .sp -1
  388. .IP \(bu 2.3
  389. .\}
  390. \fIA\fR
  391. = added
  392. .RE
  393. .sp
  394. .RS 4
  395. .ie n \{\
  396. \h'-04'\(bu\h'+03'\c
  397. .\}
  398. .el \{\
  399. .sp -1
  400. .IP \(bu 2.3
  401. .\}
  402. \fID\fR
  403. = deleted
  404. .RE
  405. .sp
  406. .RS 4
  407. .ie n \{\
  408. \h'-04'\(bu\h'+03'\c
  409. .\}
  410. .el \{\
  411. .sp -1
  412. .IP \(bu 2.3
  413. .\}
  414. \fIR\fR
  415. = renamed
  416. .RE
  417. .sp
  418. .RS 4
  419. .ie n \{\
  420. \h'-04'\(bu\h'+03'\c
  421. .\}
  422. .el \{\
  423. .sp -1
  424. .IP \(bu 2.3
  425. .\}
  426. \fIC\fR
  427. = copied (if config option status\&.renames is set to "copies")
  428. .RE
  429. .sp
  430. .RS 4
  431. .ie n \{\
  432. \h'-04'\(bu\h'+03'\c
  433. .\}
  434. .el \{\
  435. .sp -1
  436. .IP \(bu 2.3
  437. .\}
  438. \fIU\fR
  439. = updated but unmerged
  440. .RE
  441. .sp
  442. .if n \{\
  443. .RS 4
  444. .\}
  445. .nf
  446. X Y Meaning
  447. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  448. [AMD] not updated
  449. M [ MTD] updated in index
  450. T [ MTD] type changed in index
  451. A [ MTD] added to index
  452. D deleted from index
  453. R [ MTD] renamed in index
  454. C [ MTD] copied in index
  455. [MTARC] index and work tree matches
  456. [ MTARC] M work tree changed since index
  457. [ MTARC] T type changed in work tree since index
  458. [ MTARC] D deleted in work tree
  459. R renamed in work tree
  460. C copied in work tree
  461. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  462. D D unmerged, both deleted
  463. A U unmerged, added by us
  464. U D unmerged, deleted by them
  465. U A unmerged, added by them
  466. D U unmerged, deleted by us
  467. A A unmerged, both added
  468. U U unmerged, both modified
  469. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  470. ? ? untracked
  471. ! ! ignored
  472. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  473. .fi
  474. .if n \{\
  475. .RE
  476. .\}
  477. .sp
  478. Submodules have more state and instead report
  479. .sp
  480. .RS 4
  481. .ie n \{\
  482. \h'-04'\(bu\h'+03'\c
  483. .\}
  484. .el \{\
  485. .sp -1
  486. .IP \(bu 2.3
  487. .\}
  488. \fIM\fR
  489. = the submodule has a different HEAD than recorded in the index
  490. .RE
  491. .sp
  492. .RS 4
  493. .ie n \{\
  494. \h'-04'\(bu\h'+03'\c
  495. .\}
  496. .el \{\
  497. .sp -1
  498. .IP \(bu 2.3
  499. .\}
  500. \fIm\fR
  501. = the submodule has modified content
  502. .RE
  503. .sp
  504. .RS 4
  505. .ie n \{\
  506. \h'-04'\(bu\h'+03'\c
  507. .\}
  508. .el \{\
  509. .sp -1
  510. .IP \(bu 2.3
  511. .\}
  512. \fI?\fR
  513. = the submodule has untracked files
  514. .RE
  515. .sp
  516. This is since modified content or untracked files in a submodule cannot be added via \fBgit\fR \fBadd\fR in the superproject to prepare a commit\&.
  517. .sp
  518. \fIm\fR and \fI?\fR are applied recursively\&. For example if a nested submodule in a submodule contains an untracked file, this is reported as \fI?\fR as well\&.
  519. .sp
  520. If \-b is used the short\-format status is preceded by a line
  521. .sp
  522. .if n \{\
  523. .RS 4
  524. .\}
  525. .nf
  526. ## branchname tracking info
  527. .fi
  528. .if n \{\
  529. .RE
  530. .\}
  531. .SS "Porcelain Format Version 1"
  532. .sp
  533. Version 1 porcelain format is similar to the short format, but is guaranteed not to change in a backwards\-incompatible way between Git versions or based on user configuration\&. This makes it ideal for parsing by scripts\&. The description of the short format above also describes the porcelain format, with a few exceptions:
  534. .sp
  535. .RS 4
  536. .ie n \{\
  537. \h'-04' 1.\h'+01'\c
  538. .\}
  539. .el \{\
  540. .sp -1
  541. .IP " 1." 4.2
  542. .\}
  543. The user\(cqs color\&.status configuration is not respected; color will always be off\&.
  544. .RE
  545. .sp
  546. .RS 4
  547. .ie n \{\
  548. \h'-04' 2.\h'+01'\c
  549. .\}
  550. .el \{\
  551. .sp -1
  552. .IP " 2." 4.2
  553. .\}
  554. The user\(cqs status\&.relativePaths configuration is not respected; paths shown will always be relative to the repository root\&.
  555. .RE
  556. .sp
  557. There is also an alternate \-z format recommended for machine parsing\&. In that format, the status field is the same, but some other things change\&. First, the \fI\->\fR is omitted from rename entries and the field order is reversed (e\&.g \fIfrom \-> to\fR becomes \fIto from\fR)\&. Second, a NUL (ASCII 0) follows each filename, replacing space as a field separator and the terminating newline (but a space still separates the status field from the first filename)\&. Third, filenames containing special characters are not specially formatted; no quoting or backslash\-escaping is performed\&.
  558. .sp
  559. Any submodule changes are reported as modified \fBM\fR instead of \fBm\fR or single ?\&.
  560. .SS "Porcelain Format Version 2"
  561. .sp
  562. Version 2 format adds more detailed information about the state of the worktree and changed items\&. Version 2 also defines an extensible set of easy to parse optional headers\&.
  563. .sp
  564. Header lines start with "#" and are added in response to specific command line arguments\&. Parsers should ignore headers they don\(cqt recognize\&.
  565. .sp
  566. .it 1 an-trap
  567. .nr an-no-space-flag 1
  568. .nr an-break-flag 1
  569. .br
  570. .ps +1
  571. \fBBranch Headers\fR
  572. .RS 4
  573. .sp
  574. If \fB\-\-branch\fR is given, a series of header lines are printed with information about the current branch\&.
  575. .sp
  576. .if n \{\
  577. .RS 4
  578. .\}
  579. .nf
  580. Line Notes
  581. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  582. # branch\&.oid <commit> | (initial) Current commit\&.
  583. # branch\&.head <branch> | (detached) Current branch\&.
  584. # branch\&.upstream <upstream\-branch> If upstream is set\&.
  585. # branch\&.ab +<ahead> \-<behind> If upstream is set and
  586. the commit is present\&.
  587. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  588. .fi
  589. .if n \{\
  590. .RE
  591. .\}
  592. .RE
  593. .sp
  594. .it 1 an-trap
  595. .nr an-no-space-flag 1
  596. .nr an-break-flag 1
  597. .br
  598. .ps +1
  599. \fBStash Information\fR
  600. .RS 4
  601. .sp
  602. If \fB\-\-show\-stash\fR is given, one line is printed showing the number of stash entries if non\-zero:
  603. .sp
  604. .if n \{\
  605. .RS 4
  606. .\}
  607. .nf
  608. # stash <N>
  609. .fi
  610. .if n \{\
  611. .RE
  612. .\}
  613. .RE
  614. .sp
  615. .it 1 an-trap
  616. .nr an-no-space-flag 1
  617. .nr an-break-flag 1
  618. .br
  619. .ps +1
  620. \fBChanged Tracked Entries\fR
  621. .RS 4
  622. .sp
  623. Following the headers, a series of lines are printed for tracked entries\&. One of three different line formats may be used to describe an entry depending on the type of change\&. Tracked entries are printed in an undefined order; parsers should allow for a mixture of the 3 line types in any order\&.
  624. .sp
  625. Ordinary changed entries have the following format:
  626. .sp
  627. .if n \{\
  628. .RS 4
  629. .\}
  630. .nf
  631. 1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path>
  632. .fi
  633. .if n \{\
  634. .RE
  635. .\}
  636. .sp
  637. Renamed or copied entries have the following format:
  638. .sp
  639. .if n \{\
  640. .RS 4
  641. .\}
  642. .nf
  643. 2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath>
  644. .fi
  645. .if n \{\
  646. .RE
  647. .\}
  648. .sp
  649. .if n \{\
  650. .RS 4
  651. .\}
  652. .nf
  653. Field Meaning
  654. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  655. <XY> A 2 character field containing the staged and
  656. unstaged XY values described in the short format,
  657. with unchanged indicated by a "\&." rather than
  658. a space\&.
  659. <sub> A 4 character field describing the submodule state\&.
  660. "N\&.\&.\&." when the entry is not a submodule\&.
  661. "S<c><m><u>" when the entry is a submodule\&.
  662. <c> is "C" if the commit changed; otherwise "\&."\&.
  663. <m> is "M" if it has tracked changes; otherwise "\&."\&.
  664. <u> is "U" if there are untracked changes; otherwise "\&."\&.
  665. <mH> The octal file mode in HEAD\&.
  666. <mI> The octal file mode in the index\&.
  667. <mW> The octal file mode in the worktree\&.
  668. <hH> The object name in HEAD\&.
  669. <hI> The object name in the index\&.
  670. <X><score> The rename or copy score (denoting the percentage
  671. of similarity between the source and target of the
  672. move or copy)\&. For example "R100" or "C75"\&.
  673. <path> The pathname\&. In a renamed/copied entry, this
  674. is the target path\&.
  675. <sep> When the `\-z` option is used, the 2 pathnames are separated
  676. with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
  677. byte separates them\&.
  678. <origPath> The pathname in the commit at HEAD or in the index\&.
  679. This is only present in a renamed/copied entry, and
  680. tells where the renamed/copied contents came from\&.
  681. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  682. .fi
  683. .if n \{\
  684. .RE
  685. .\}
  686. .sp
  687. Unmerged entries have the following format; the first character is a "u" to distinguish from ordinary changed entries\&.
  688. .sp
  689. .if n \{\
  690. .RS 4
  691. .\}
  692. .nf
  693. u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>
  694. .fi
  695. .if n \{\
  696. .RE
  697. .\}
  698. .sp
  699. .if n \{\
  700. .RS 4
  701. .\}
  702. .nf
  703. Field Meaning
  704. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  705. <XY> A 2 character field describing the conflict type
  706. as described in the short format\&.
  707. <sub> A 4 character field describing the submodule state
  708. as described above\&.
  709. <m1> The octal file mode in stage 1\&.
  710. <m2> The octal file mode in stage 2\&.
  711. <m3> The octal file mode in stage 3\&.
  712. <mW> The octal file mode in the worktree\&.
  713. <h1> The object name in stage 1\&.
  714. <h2> The object name in stage 2\&.
  715. <h3> The object name in stage 3\&.
  716. <path> The pathname\&.
  717. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  718. .fi
  719. .if n \{\
  720. .RE
  721. .\}
  722. .RE
  723. .sp
  724. .it 1 an-trap
  725. .nr an-no-space-flag 1
  726. .nr an-break-flag 1
  727. .br
  728. .ps +1
  729. \fBOther Items\fR
  730. .RS 4
  731. .sp
  732. Following the tracked entries (and if requested), a series of lines will be printed for untracked and then ignored items found in the worktree\&.
  733. .sp
  734. Untracked items have the following format:
  735. .sp
  736. .if n \{\
  737. .RS 4
  738. .\}
  739. .nf
  740. ? <path>
  741. .fi
  742. .if n \{\
  743. .RE
  744. .\}
  745. .sp
  746. Ignored items have the following format:
  747. .sp
  748. .if n \{\
  749. .RS 4
  750. .\}
  751. .nf
  752. ! <path>
  753. .fi
  754. .if n \{\
  755. .RE
  756. .\}
  757. .RE
  758. .sp
  759. .it 1 an-trap
  760. .nr an-no-space-flag 1
  761. .nr an-break-flag 1
  762. .br
  763. .ps +1
  764. \fBPathname Format Notes and -z\fR
  765. .RS 4
  766. .sp
  767. When the \fB\-z\fR option is given, pathnames are printed as is and without any quoting and lines are terminated with a NUL (ASCII 0x00) byte\&.
  768. .sp
  769. Without the \fB\-z\fR option, pathnames with "unusual" characters are quoted as explained for the configuration variable \fBcore\&.quotePath\fR (see \fBgit-config\fR(1))\&.
  770. .RE
  771. .SH "CONFIGURATION"
  772. .sp
  773. The command honors \fBcolor\&.status\fR (or \fBstatus\&.color\fR \(em they mean the same thing and the latter is kept for backward compatibility) and \fBcolor\&.status\&.\fR\fI<slot>\fR configuration variables to colorize its output\&.
  774. .sp
  775. If the config variable \fBstatus\&.relativePaths\fR is set to false, then all paths shown are relative to the repository root, not to the current directory\&.
  776. .sp
  777. If \fBstatus\&.submoduleSummary\fR is set to a non zero number or true (identical to \-1 or an unlimited number), the submodule summary will be enabled for the long format and a summary of commits for modified submodules will be shown (see \-\-summary\-limit option of \fBgit-submodule\fR(1))\&. Please note that the summary output from the status command will be suppressed for all submodules when \fBdiff\&.ignoreSubmodules\fR is set to \fIall\fR or only for those submodules where \fBsubmodule\&.\fR\fI<name>\fR\fB\&.ignore=all\fR\&. To also view the summary for ignored submodules you can either use the \-\-ignore\-submodules=dirty command line option or the \fIgit submodule summary\fR command, which shows a similar output but does not honor these settings\&.
  778. .SH "BACKGROUND REFRESH"
  779. .sp
  780. By default, \fBgit\fR \fBstatus\fR will automatically refresh the index, updating the cached stat information from the working tree and writing out the result\&. Writing out the updated index is an optimization that isn\(cqt strictly necessary (\fBstatus\fR computes the values for itself, but writing them out is just to save subsequent programs from repeating our computation)\&. When \fBstatus\fR is run in the background, the lock held during the write may conflict with other simultaneous processes, causing them to fail\&. Scripts running \fBstatus\fR in the background should consider using \fBgit\fR \fB\-\-no\-optional\-locks\fR \fBstatus\fR (see \fBgit\fR(1) for details)\&.
  781. .SH "UNTRACKED FILES AND PERFORMANCE"
  782. .sp
  783. \fBgit\fR \fBstatus\fR can be very slow in large worktrees if/when it needs to search for untracked files and directories\&. There are many configuration options available to speed this up by either avoiding the work or making use of cached results from previous Git commands\&. There is no single optimum set of settings right for everyone\&. We\(cqll list a summary of the relevant options to help you, but before going into the list, you may want to run \fBgit\fR \fBstatus\fR again, because your configuration may already be caching \fBgit\fR \fBstatus\fR results, so it could be faster on subsequent runs\&.
  784. .sp
  785. .RS 4
  786. .ie n \{\
  787. \h'-04'\(bu\h'+03'\c
  788. .\}
  789. .el \{\
  790. .sp -1
  791. .IP \(bu 2.3
  792. .\}
  793. The
  794. \fB\-\-untracked\-files=no\fR
  795. flag or the
  796. \fBstatus\&.showUntrackedFiles=no\fR
  797. config (see above for both): indicate that
  798. \fBgit\fR
  799. \fBstatus\fR
  800. should not report untracked files\&. This is the fastest option\&.
  801. \fBgit\fR
  802. \fBstatus\fR
  803. will not list the untracked files, so you need to be careful to remember if you create any new files and manually
  804. \fBgit\fR
  805. \fBadd\fR
  806. them\&.
  807. .RE
  808. .sp
  809. .RS 4
  810. .ie n \{\
  811. \h'-04'\(bu\h'+03'\c
  812. .\}
  813. .el \{\
  814. .sp -1
  815. .IP \(bu 2.3
  816. .\}
  817. \fBadvice\&.statusUoption=false\fR
  818. (see
  819. \fBgit-config\fR(1)): setting this variable to
  820. \fBfalse\fR
  821. disables the warning message given when enumerating untracked files takes more than 2 seconds\&. In a large project, it may take longer and the user may have already accepted the trade off (e\&.g\&. using "\-uno" may not be an acceptable option for the user), in which case, there is no point issuing the warning message, and in such a case, disabling the warning may be the best\&.
  822. .RE
  823. .sp
  824. .RS 4
  825. .ie n \{\
  826. \h'-04'\(bu\h'+03'\c
  827. .\}
  828. .el \{\
  829. .sp -1
  830. .IP \(bu 2.3
  831. .\}
  832. \fBcore\&.untrackedCache=true\fR
  833. (see
  834. \fBgit-update-index\fR(1)): enable the untracked cache feature and only search directories that have been modified since the previous
  835. \fBgit\fR
  836. \fBstatus\fR
  837. command\&. Git remembers the set of untracked files within each directory and assumes that if a directory has not been modified, then the set of untracked files within has not changed\&. This is much faster than enumerating the contents of every directory, but still not without cost, because Git still has to search for the set of modified directories\&. The untracked cache is stored in the \&.\fBgit/index\fR
  838. file\&. The reduced cost of searching for untracked files is offset slightly by the increased size of the index and the cost of keeping it up\-to\-date\&. That reduced search time is usually worth the additional size\&.
  839. .RE
  840. .sp
  841. .RS 4
  842. .ie n \{\
  843. \h'-04'\(bu\h'+03'\c
  844. .\}
  845. .el \{\
  846. .sp -1
  847. .IP \(bu 2.3
  848. .\}
  849. \fBcore\&.untrackedCache=true\fR
  850. and
  851. \fBcore\&.fsmonitor=true\fR
  852. or
  853. \fBcore\&.fsmonitor=\fR\fI<hook\-command\-pathname>\fR
  854. (see
  855. \fBgit-update-index\fR(1)): enable both the untracked cache and FSMonitor features and only search directories that have been modified since the previous
  856. \fBgit\fR
  857. \fBstatus\fR
  858. command\&. This is faster than using just the untracked cache alone because Git can also avoid searching for modified directories\&. Git only has to enumerate the exact set of directories that have changed recently\&. While the FSMonitor feature can be enabled without the untracked cache, the benefits are greatly reduced in that case\&.
  859. .RE
  860. .sp
  861. Note that after you turn on the untracked cache and/or FSMonitor features it may take a few \fBgit\fR \fBstatus\fR commands for the various caches to warm up before you see improved command times\&. This is normal\&.
  862. .SH "SEE ALSO"
  863. .sp
  864. \fBgitignore\fR(5)
  865. .SH "GIT"
  866. .sp
  867. Part of the \fBgit\fR(1) suite