Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-status(1) |
| 2 | ============= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 6 | git-status - Show the working tree status |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 8fd5230 | 2006-08-10 00:18:08 | [diff] [blame] | 11 | 'git-status' <options>... |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | Examines paths in the working tree that has changes unrecorded |
| 16 | to the index file, and changes between the index file and the |
| 17 | current HEAD commit. The former paths are what you _could_ |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 18 | commit by running 'git add' before running 'git |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 19 | commit', and the latter paths are what you _would_ commit by |
| 20 | running 'git commit'. |
| 21 | |
| 22 | If there is no path that is different between the index file and |
| 23 | the current HEAD commit, the command exits with non-zero |
| 24 | status. |
| 25 | |
Junio C Hamano | 8fd5230 | 2006-08-10 00:18:08 | [diff] [blame] | 26 | The command takes the same set of options as `git-commit`; it |
| 27 | shows what would be committed if the same options are given to |
| 28 | `git-commit`. |
| 29 | |
Junio C Hamano | b515b6a | 2007-08-08 09:21:16 | [diff] [blame] | 30 | If any paths have been touched in the working tree (that is, |
| 31 | their modification times have changed) but their contents and |
| 32 | permissions are identical to those in the index file, the command |
| 33 | updates the index file. Running `git-status` can thus speed up |
| 34 | subsequent operations such as `git-diff` if the working tree |
| 35 | contains many paths that have been touched but not modified. |
| 36 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 37 | |
| 38 | OUTPUT |
| 39 | ------ |
| 40 | The output from this command is designed to be used as a commit |
| 41 | template comments, and all the output lines are prefixed with '#'. |
| 42 | |
| 43 | |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 44 | CONFIGURATION |
| 45 | ------------- |
| 46 | |
| 47 | The command honors `color.status` (or `status.color` -- they |
| 48 | mean the same thing and the latter is kept for backward |
| 49 | compatibility) and `color.status.<slot>` configuration variables |
| 50 | to colorize its output. |
| 51 | |
Junio C Hamano | 679d22d | 2007-06-02 21:13:44 | [diff] [blame] | 52 | See Also |
| 53 | -------- |
| 54 | gitlink:gitignore[5] |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 55 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | Author |
| 57 | ------ |
| 58 | Written by Linus Torvalds <torvalds@osdl.org> and |
| 59 | Junio C Hamano <junkio@cox.net>. |
| 60 | |
| 61 | Documentation |
| 62 | -------------- |
| 63 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 64 | |
| 65 | GIT |
| 66 | --- |
| 67 | Part of the gitlink:git[7] suite |