1CG-REF(7) CG-REF(7)
2
3
4
6 cg-ref - Cogito quick reference
7
9 A list of frequently used commands grouped with related commands.
10
11
13 Getting help:
14 cg help command Show help for a command
15 cg command -h Show usage summary for a command
16
17 Repository creation:
18 cg init Create a repository in the current directory
19 cg clone url Clone a remote repository into a subdirectory
20
21 File operations:
22 cg add file Add file to the working tree
23 cg add -r directory Recursively add files in directory
24 cg rm file Remove file or directory from the working tree
25 cg rm -r directory Recursively remove files in directory
26 -f Delete file from disk
27 cg mv file destination Move file or directory to new location
28 -f Overwrite existing destination files
29 cg restore file Restore file
30 -r revision Bring back file from revision (and add it)
31 -f Overwrite uncommitted changes
32
33 Working tree:
34 cg status [file] Show branches and status of the working tree
35 cg reset Reset the working tree to the last commit
36 cg clean Clean unknown files from the working tree
37 cg commit [file] Commit the working tree
38 -m message Append message to commit log
39 cg admin-uncommit Undo commit
40 cg seek revision Temporarily switch the working tree
41
42 Examining History:
43 cg log [file] View commit log
44 -r revision Limit to revision range
45 -f List affected files
46 -s Summarize commits to one line
47 cg diff [file] Show diff of changes
48 -r revision Diff revision instead of working tree
49 -p Diff against parent
50 -s Show diff stat
51
52 Remote branches:
53 cg fetch [branch] Fetch changes from a remote branch
54 cg update [branch] Fetch and merge changes from a remote branch
55 cg push [branch] Push changes to a remote branch
56 cg branch-ls List remote branches
57 cg branch-add branch url Add remote branch
58 cg branch-chg branch url Change URL of existing branch
59
60 Local branches:
61 cg merge branch Merge changes from branch (even a remote one)
62 cg switch branch Switch the working tree to branch
63 -r revision Create branch from revision
64 -f Overwrite existing branch
65
66 Exporting and importing:
67 cg patch < file Apply patch from stdin
68 cg mkpatch Format a patch with log message and diffstat
69 -r revision Limit to revision range
70 cg export directory Export snapshot to directory
71 cg export file.tar.gz Export snapshot to tar file
72 -r revision Base snapshot on revision
73
74 Tags:
75 cg tag name revision Create tag for a given revision
76 -s Sign tag with your private key using GPG
77 cg tag-ls Show name and revision for all tags
78
79 File status flags:
80 ? unknown File is not under revision control
81 A added File has been added
82 D deleted File has been deleted
83 ! disappeared File is missing from the working tree
84 M modified File has been touched or modified
85 m modified (while merging) File was modified prior to the merge
86
88 Copyright © Jonas Fonseca, 2006.
89
90
92 cg-ref(7) is part of cogito(7), a toolkit for managing git(7) trees.
93
94
95
96
97 12/11/2006 CG-REF(7)