4.3. Create a new repository

To create a new repository into an existing directory (project) you have to run the init dialog. From the explorer context menu select TortoiseHg... ‣ Create Repository Here over the directory, or, within the folder, type hgtk init.

Init dialog

Repository Init Dialog

Destination
Is the directory where the repository will be created. It is always filled with the current directory, so if you launch the dialog from the right directory there is no reason to change it.
Add special files (.hgignore, ...)
If selected TortoiseHg creates an empty .hgignore file in the working directory.
Make repo compatible with Mercurial 1.0
If selected TortoiseHg creates an older format Mercurial repository. Do not check unless you have a strong reason to do, and you know what you are doing.

Creating a new repository means create a subdirectory called .hg. In this subdirectory Mercurial keeps all its versioning information.

Warning

It is dangerous to manually edit the files in .hg directory, repository corruption can occur. .hg/hgrc is perhaps the only exception to this rule.

4.3.1. From command line

The init tool can be started from command line

hgtk init

The syntax is

hgtk init [DEST]

where [DEST] is the path to destination folder.

Table Of Contents

Previous topic

4.2. Windows Explorer Integration

Next topic

4.4. Clone a repository

This Page