cg-status

Langue: en

Version: 02/24/2009 (fedora - 04/07/09)

Section: 1 (Commandes utilisateur)

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 not known to Cogito. See the IGNORING section below.

A


<file> has been added.

D


<file> has been deleted.

!


<file> is gone from your working copy but not deleted by gitm[blue]1m[][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 gitm[blue]1m[][2]. 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 gitm[blue]1m[][3].

NOTES

If a file has been removed with gitm[blue]1m[][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.

IGNORING

You can declare some files to be ignored: this means that they will not be listed as unknown in gitm[blue]1m[][3], gitm[blue]1m[][4] will not remove them (unless -x is passed), and gitm[blue]1m[][5] and cg-add -a will not add them. However, the moment you explicitly tell Cogito about them using gitm[blue]1m[][6], Cogito will stop ignoring them; it will commit any modifications in them, etc.: the concept is the same as e.g. in CVS. Typically, autogenerated and backup files are marked as ignored.

Which files to ignore is determined by lists of exclude patterns stored in various files. There is one pattern per line and the patterns are classic shell glob patterns (with * and ? wildcards). The pattern can be prefixed by ! to unignore matching files. If the pattern does not contain a slash, it is applied in all directories; otherwise, only to the given path in the tree; use leading slash to denote the tree root.

For example, consider the following:

 .*
 !.gitignore
 !/.list
 

This will ignore all hidden files except .gitignore in all directories and the .list file in project root.

When collecting the ignore patterns, first the default ignore patterns are loaded from /usr/share/cogito/default-exclude (or a slightly different path depending on your installation prefix). Then, .git/info/exclude from your working copy is loaded. At last, during the actual tree traversal .gitignore in each visited directory is loaded for the time of its traversal.

FILES

$GIT_DIR/info/exclude

The list of ignore patterns; the list itself is not version-tracked and is local to this particular clone.

.gitignore

.gitignore in the working tree will be also scanned for ignore patterns. Contrary to the exclude file, it is usually version-tracked.

BUGS

One known bug is that when you gitm[blue]1m[][6] a new file and then delete it but do not call gitm[blue]1m[][1], it will not be listed in gitm[blue]1m[][3] output, but from the merging point of view there will still be "local changes" and gitm[blue]1m[][7] will show a diff.

Copyright © Petr Baudis, 2005 Copyright © Pavel Roskin 2005

SEE ALSO

cg-status is part of gitm[blue]7m[][8], a toolkit for managing gitm[blue]7m[][9] trees.

NOTES

1.
1
[set $man.base.url.for.relative.links]/cg-rm
2.
1
[set $man.base.url.for.relative.links]/cg-commit
3.
1
[set $man.base.url.for.relative.links]/cg-status
4.
1
[set $man.base.url.for.relative.links]/cg-clean
5.
1
[set $man.base.url.for.relative.links]/cg-init
6.
1
[set $man.base.url.for.relative.links]/cg-add
7.
1
[set $man.base.url.for.relative.links]/cg-diff
8.
7
[set $man.base.url.for.relative.links]/cogito
9.
7
[set $man.base.url.for.relative.links]/git