cg-status(1)
============

NAME
----
cg-status - show status of the repository and your working tree

SYNOPSIS
--------
cg-status [-g] [[-n] -s STATUS] [-w] [-x] [DIRPATH]

DESCRIPTION
-----------
The output includes the list of branches and merge status.
Current branch is marked with ">", remote branches are marked with "R".
Branches with shelved local changes (currently produced only by
`cg-switch -l`) are marked with "s".

Then, the files in the working tree are printed out. The output has
the following format:

	<status flag> <file>

where '<status flag>' can be one of the following:

?::
	'<file>' is unknown.
A::
	'<file>' has been added.
D::
	'<file>' has been deleted.
!::
	'<file>' is gone from your working copy but not deleted by gitlink:cg-rm[1].
M::
	'<file>' has been touched or modified.
m::
	'<file>' has been touched or modified, but will not be automatically
	committed the next time you call gitlink:cg-commit[1]. This is used during a
	merge to mark files which contained local changes before the merge.

OPTIONS
-------

--
	If neither -g or -w is passed, both is shown; otherwise, only the
	corresponding parts are shown.

-g::
	Show the GIT repository information.

-n::
	Do not show status flags. This is probably useful only when you filter
	the flags for a single specific flag using the '-s' option.

-s STATUS::
	Show only files with the given status flag, e.g. '-s D'. You can list
	multiple flags ('-s MmA') to filter for all of them. You can prepend
	'^' to the STATUS argument to invert the filter - only items with flags
	NOT listed in the STATUS string will be printed out.

-S::
	By default, cg-status will not list full contents of untracked
	directories but only their name. This option will make it show the
	all untracked files inside as well.

-w::
	Show the working tree file list.

-x::
	Don't exclude any files from listing.

DIRPATH::
	Path to the directory to use as the base for the working tree
	file list (instead of the current directory).


-h, --help::
	Print usage summary.

--long-help::
	Print user manual. The same as found in gitlink:cg-status[1].
--


NOTES
-----
If a file has been removed with gitlink:cg-rm[1] without using the `-f` option
to remove it physically from the tree it will be reported as both being
deleted and unknown. The reason for this is that the file is internally
marked as deleted and thus also untracked. After next commit it will only
be reported as being untracked.

FILES
-----
$GIT_DIR/info/exclude::
	If the file exists it will be used to prune which files to
	show status for. The format is similar to the `dontdiff` file;
	each line contains a pattern for a file or group of files
	to exclude.

$TREE_DIR/.gitignore::
	.gitignore in the working tree will be used as an exclude file.
	The excludes are applied from the project root approaching the
	current subdirectory.

BUGS
----
One known bug is that when you gitlink:cg-add[1] a new file and then delete it
but do not call gitlink:cg-rm[1], it will not be listed in gitlink:cg-status[1] output,
but from the merging point of view there will still be "local changes"
and gitlink:cg-diff[1] will show a diff.

COPYRIGHT
---------
Copyright (C) Petr Baudis, 2005
Copyright (C) Pavel Roskin 2005

SEE ALSO
--------
cg-status is part of gitlink:cogito[7],
a toolkit for managing gitlink:git[7] trees.
