Test commit
[cogito/jonas.git] / Documentation / cg-ref.txt
blobc3199eb6f52edd348be58698b98a47544ab01774
1 Cogito Quick Reference
2 ======================
4 [frame="none"]
5 `-------------------------------`---------------------------------------------
6 Getting help:
7 ------------------------------------------------------------------------------
8 *cg help* 'command'             Show help for a command
9 *cg* 'command' -h               Show usage summary for a command
10 ------------------------------------------------------------------------------
12 [frame="none"]
13 `-------------------------------`---------------------------------------------
14 Repository creation:
15 ------------------------------------------------------------------------------
16 *cg init*                       Create a repository in the current directory
17 *cg clone* 'url'                Clone a remote repository into a subdirectory
18 ------------------------------------------------------------------------------
20 [frame="none"]
21 `-------------------------------`---------------------------------------------
22 File operations:
23 ------------------------------------------------------------------------------
24 *cg add* 'file'                 Add file to the working tree
25 *cg add* -r 'directory'         Recursively add files in directory
26 *cg rm* 'file'                  Remove file or directory from the working tree
27 *cg rm* -r 'directory'          Recursively remove files in directory
28 {cg-refopt} -f                  Delete file from disk
29 *cg mv* 'file' 'destination'    Move file or directory to new location
30 {cg-refopt} -f                  Overwrite existing destination files
31 *cg restore* 'file'             Restore file
32 {cg-refopt} -r 'revision'       Bring back file from revision (and add it)
33 {cg-refopt} -f                  Overwrite uncommitted changes
34 ------------------------------------------------------------------------------
36 [frame="none"]
37 `-------------------------------`---------------------------------------------
38 Working tree:
39 ------------------------------------------------------------------------------
40 *cg status* '[file]'            Show branches and status of the working tree
41 *cg reset*                      Reset the working tree to the last commit
42 *cg clean*                      Clean unknown files from the working tree
43 *cg commit* '[file]'            Commit the working tree
44 {cg-refopt} -m 'message'        Append message to commit log
45 *cg admin-uncommit*             Undo commit
46 *cg seek* 'revision'            Temporarily switch the working tree
47 ------------------------------------------------------------------------------
49 [frame="none"]
50 `-------------------------------`---------------------------------------------
51 Examining History:
52 ------------------------------------------------------------------------------
53 *cg log* '[file]'               View commit log
54 {cg-refopt} -r 'revision'       Limit to revision range
55 {cg-refopt} -f                  List affected files
56 {cg-refopt} -s                  Summarize commits to one line
57 *cg diff* '[file]'              Show diff of changes
58 {cg-refopt} -r 'revision'       Diff revision instead of working tree
59 {cg-refopt} -p                  Diff against parent
60 {cg-refopt} -s                  Show diff stat
61 ------------------------------------------------------------------------------
63 [frame="none"]
64 `-------------------------------`---------------------------------------------
65 Remote branches:
66 ------------------------------------------------------------------------------
67 *cg fetch* '[branch]'           Fetch changes from a remote branch
68 *cg update* '[branch]'          Fetch and merge changes from a remote branch
69 *cg push* '[branch]'            Push changes to a remote branch
70 *cg branch-ls*                  List remote branches
71 *cg branch-add* 'branch' 'url'  Add remote branch
72 *cg branch-chg* 'branch' 'url'  Change URL of existing branch
73 ------------------------------------------------------------------------------
75 [frame="none"]
76 `-------------------------------`---------------------------------------------
77 Local branches:
78 ------------------------------------------------------------------------------
79 *cg merge* 'branch'             Merge changes from branch (even a remote one)
80 *cg switch* 'branch'            Switch the working tree to branch
81 {cg-refopt} -r 'revision'       Create branch from revision
82 {cg-refopt} -f                  Overwrite existing branch
83 ------------------------------------------------------------------------------
85 [frame="none"]
86 `-------------------------------`---------------------------------------------
87 Exporting and importing:
88 ------------------------------------------------------------------------------
89 *cg patch* < 'file'             Apply patch from stdin
90 *cg mkpatch*                    Format a patch with log message and diffstat
91 {cg-refopt} -r 'revision'       Limit to revision range
92 *cg export* 'directory'         Export snapshot to directory
93 *cg export* 'file.tar.gz'       Export snapshot to tar file
94 {cg-refopt} -r 'revision'       Base snapshot on revision       
95 ------------------------------------------------------------------------------
97 [frame="none"]
98 `-------------------------------`---------------------------------------------
99 Tags:
100 ------------------------------------------------------------------------------
101 *cg tag* 'name' 'revision'      Create tag for a given revision
102 {cg-refopt} -s                  Sign tag with your private key using GPG
103 *cg tag-ls*                     Show name and revision for all tags
104 ------------------------------------------------------------------------------
106 [frame="none"]
107 `-------------------------------`---------------------------------------------
108 File status flags:
109 ------------------------------------------------------------------------------
110 `?` unknown                     File is not under revision control
111 `A` added                       File has been added
112 `D` deleted                     File has been deleted
113 `!` disappeared                 File is missing from the working tree
114 `M` modified                    File has been touched or modified
115 `m` modified (while merging)    File was modified prior to the merge
116 ------------------------------------------------------------------------------