Cogito Quick Reference ====================== [frame="none"] `-------------------------------`--------------------------------------------- Getting help: ------------------------------------------------------------------------------ *cg help* 'command' Show help for a command *cg* 'command' -h Show usage summary for a command ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Repository creation: ------------------------------------------------------------------------------ *cg init* Create a repository in the current directory *cg clone* 'url' Clone a remote repository into a subdirectory ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- File operations: ------------------------------------------------------------------------------ *cg add* 'file' Add file to the working tree *cg add* -r 'directory' Recursively add files in directory *cg rm* 'file' Remove file or directory from the working tree *cg rm* -r 'directory' Recursively remove files in directory {cg-refopt} -f Delete file from disk *cg mv* 'file' 'destination' Move file or directory to new location {cg-refopt} -f Overwrite existing destination files *cg restore* 'file' Restore file {cg-refopt} -r 'revision' Bring back file from revision (and add it) {cg-refopt} -f Overwrite uncommitted changes ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Working tree: ------------------------------------------------------------------------------ *cg status* '[file]' Show branches and status of the working tree *cg reset* Reset the working tree to the last commit *cg clean* Clean unknown files from the working tree *cg commit* '[file]' Commit the working tree {cg-refopt} -m 'message' Append message to commit log *cg admin-uncommit* Undo commit *cg seek* 'revision' Temporarily switch the working tree ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Examining History: ------------------------------------------------------------------------------ *cg log* '[file]' View commit log {cg-refopt} -r 'revision' Limit to revision range {cg-refopt} -f List affected files {cg-refopt} -s Summarize commits to one line *cg diff* '[file]' Show diff of changes {cg-refopt} -r 'revision' Diff revision instead of working tree {cg-refopt} -p Diff against parent {cg-refopt} -s Show diff stat ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Remote branches: ------------------------------------------------------------------------------ *cg fetch* '[branch]' Fetch changes from a remote branch *cg update* '[branch]' Fetch and merge changes from a remote branch *cg push* '[branch]' Push changes to a remote branch *cg branch-ls* List remote branches *cg branch-add* 'branch' 'url' Add remote branch *cg branch-chg* 'branch' 'url' Change URL of existing branch ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Local branches: ------------------------------------------------------------------------------ *cg merge* 'branch' Merge changes from branch (even a remote one) *cg switch* 'branch' Switch the working tree to branch {cg-refopt} -r 'revision' Create branch from revision {cg-refopt} -f Overwrite existing branch ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Exporting and importing: ------------------------------------------------------------------------------ *cg patch* < 'file' Apply patch from stdin *cg mkpatch* Format a patch with log message and diffstat {cg-refopt} -r 'revision' Limit to revision range *cg export* 'directory' Export snapshot to directory *cg export* 'file.tar.gz' Export snapshot to tar file {cg-refopt} -r 'revision' Base snapshot on revision ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- Tags: ------------------------------------------------------------------------------ *cg tag* 'name' 'revision' Create tag for a given revision {cg-refopt} -s Sign tag with your private key using GPG *cg tag-ls* Show name and revision for all tags ------------------------------------------------------------------------------ [frame="none"] `-------------------------------`--------------------------------------------- File status flags: ------------------------------------------------------------------------------ `?` unknown File is not under revision control `A` added File has been added `D` deleted File has been deleted `!` disappeared File is missing from the working tree `M` modified File has been touched or modified `m` modified (while merging) File was modified prior to the merge ------------------------------------------------------------------------------