- GIT_DIR=$REPOSITORY git --bare init --shared
- cd $SRCDIR
- git init
- echo /.ikiwiki > .gitignore
- git add .
- git commit -m "initial commit"
- git remote add origin $REPOSITORY
- git config branch.master.merge refs/heads/master
- git push --all
-
-It is **paramount** that you **never** push to the Git repository in
-`$SRCDIR` ([this FAQ entry explains
-why](http://git.or.cz/gitwiki/GitFaq#head-b6a3d85f677763313159eb39f7dbf4579d4ee28b)).
-Instead, if you want to work on the wiki from a remote machine, clone
-`$REPOSITORY`, using either the `git` transport (if available), or
-`ssh`.
-
-If at any point you commit changes in `$SRCDIR`, make sure to `git
-push` them to the `$REPOSITORY`. ikiwiki will do this automatically
-for any changes made via the web.
-
-Finally, see [[Git_pitfalls]] if you experience problems.
+ ikiwiki-makerepo git $SRCDIR $REPOSITORY
+
+Please see [[rcs/git]] for detailed documentation about how
+ikiwiki uses git repositories, and some important caveats
+about using the git repositories.
+"""]]
+
+[[toggle id=mercurial text="Mercurial"]]
+[[toggleable id=mercurial text="""
+ REPOSITORY=$SRCDIR
+ ikiwiki-makerepo mercurial $SRCDIR