---
name: "cg-init"
section: "1"
platform: "linux"
package: "cogito"
version: "0.18.2-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/cg-init"
---

# cg-init(1)

initialize new repository

## NAME

cg-init - initialize new repository

## SYNOPSIS

cg-init \[-I\] \[-N\] \[-e EXCLUDEPATTERN\]... \[-m MESSAGE\]....sp

## DESCRIPTION

[**cg-init**(1)](/cg-init/1.md) called in a non-empty directory will automatically add its contents in the initial commit. (Please note that certain default ignore rules are applied during this operation - see [**cg-status**(1)](/cg-status/1.md) for detailed description. If any files were not added due to this, cg-init will advise you what to do.).sp This command is intended for creating repositories for work on new projects. If you want to clone an existing project, see [**cg-clone**(1)](/cg-clone/1.md). If you want to set up a public repository not for direct work but only for pushing/pulling, see [**cg-admin-setuprepo**(1)](/cg-admin-setuprepo/1.md). It is also possible to import repositories from other SCMs to GIT, see [git-cvsimport(1)](/git-cvsimport/1.md), [git-svnimport(1)](/git-svnimport/1.md) and [git-archimport(1)](/git-archimport/1.md)..sp

## OPTIONS

- \-e EXCLUDEPATTERN

  Ignore files matching this pattern when importing files for the initial commit. Note that if you are importing any .gitignore files, they will be considered as well (see [**cg-status**(1)](/cg-status/1.md) for details on the files ignoring concept). If you want to make an even more custom choice of files to be imported, use the -I parameter and add and perform the initial commit manually.

- \-I

  Do not perform the initial commit. You can perform the initial commit manually later, but you will need to pass cg-commit the -C parameter.

- \-m MESSAGE

  Specify the commit message for the initial commit. See [**cg-commit**(1)](/cg-commit/1.md) documentation for details.

- \-N

  Only update the cache: do not copy the data into the object database. This is for special purposes when you might not actually \_have\_ any object database. This option is normally not interesting.

- \-h, --help

  Print usage summary.

- \--long-help

  Print user manual. The same as found in [**cg-init**(1)](/cg-init/1.md).

## COPYRIGHT

Copyright © Petr Baudis, 2005.sp

## SEE ALSO

cg-init is part of [**cogito**(7)](/cogito/7.md), a toolkit for managing [**git**(7)](/git/7.md) trees..sp
