- Go to the directory you wish to create a repository for.
- Initialize the directory to be Hg-aware.
% hg init
- Set up your .hgignore.
syntax: glob .metadata/ .hgignore CVS/ .svn/ port/build/ classes/ target/ *.rej *.*~
- Add the files to the working set. Hg is much faster than THG here, but THG has better functionality to help you amend your ignore file.
% hg add
- Commit this as your initial commit.
% hg commit -m "Initial Commit"
- If you want to (http) serve the repository and allow unauthenticated pushes, you need to create an hgrc in the .hg directory with the following contents:
[web] allow_push = * push_ssl = false
- Start serving the repository.
% hg serve listening at http://pod187.intware.com:8000/ (bound to *:8000)