blob: a1bb9bd8290777c41c99b1bfc3a0e6f111705a6d [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-status(1)
2=============
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-status - Show the working tree status
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano8fd52302006-08-10 00:18:0811'git-status' <options>...
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
Junio C Hamano942b35e2007-12-09 10:19:3315Displays paths that have differences between the index file and the
16current HEAD commit, paths that have differences between the working
17tree and the index file, and paths in the working tree that are not
18tracked by git (and are not ignored by gitlink:gitignore[5]). The first
19are what you _would_ commit by running `git commit`; the second and
20third are what you _could_ commit by running `git add` before running
21`git commit`.
Junio C Hamano1a4e8412005-12-27 08:17:2322
Junio C Hamano8fd52302006-08-10 00:18:0823The command takes the same set of options as `git-commit`; it
24shows what would be committed if the same options are given to
25`git-commit`.
26
Junio C Hamano942b35e2007-12-09 10:19:3327If there is no path that is different between the index file and
28the current HEAD commit (i.e., there is nothing to commit by running
29`git-commit`), the command exits with non-zero status.
30
Junio C Hamanob515b6a2007-08-08 09:21:1631If any paths have been touched in the working tree (that is,
32their modification times have changed) but their contents and
33permissions are identical to those in the index file, the command
34updates the index file. Running `git-status` can thus speed up
35subsequent operations such as `git-diff` if the working tree
36contains many paths that have been touched but not modified.
37
Junio C Hamano1a4e8412005-12-27 08:17:2338
39OUTPUT
40------
41The output from this command is designed to be used as a commit
Junio C Hamano942b35e2007-12-09 10:19:3342template comment, and all the output lines are prefixed with '#'.
Junio C Hamano1a4e8412005-12-27 08:17:2343
Junio C Hamano00b8b632007-12-07 09:50:4944The paths mentioned in the output, unlike many other git commands, are
Junio C Hamano942b35e2007-12-09 10:19:3345made relative to the current directory if you are working in a
46subdirectory (this is on purpose, to help cutting and pasting). See
47the status.relativePaths config option below.
Junio C Hamano00b8b632007-12-07 09:50:4948
Junio C Hamano1a4e8412005-12-27 08:17:2349
Junio C Hamanof9771f62007-01-17 17:42:3050CONFIGURATION
51-------------
52
53The command honors `color.status` (or `status.color` -- they
54mean the same thing and the latter is kept for backward
55compatibility) and `color.status.<slot>` configuration variables
56to colorize its output.
57
Junio C Hamano942b35e2007-12-09 10:19:3358If the config variable `status.relativePaths` is set to false, then all
59paths shown are relative to the repository root, not to the current
60directory.
61
Junio C Hamano679d22d2007-06-02 21:13:4462See Also
63--------
64gitlink:gitignore[5]
Junio C Hamanof9771f62007-01-17 17:42:3065
Junio C Hamano1a4e8412005-12-27 08:17:2366Author
67------
68Written by Linus Torvalds <torvalds@osdl.org> and
69Junio C Hamano <junkio@cox.net>.
70
71Documentation
72--------------
73Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
74
75GIT
76---
77Part of the gitlink:git[7] suite