Document Gerrit importing
diff --git a/TODO.on.site b/TODO.on.site
index 35a9079..61ac62b 100644
--- a/TODO.on.site
+++ b/TODO.on.site
@@ -32,3 +32,24 @@
 message immediately.
 * Set `smtp_skip_5xx_greeting = no` in `mail/config/postfix-main.cf`,
   if you want immediate bounces.
+
+Import projects into Gerrit:
+* `sudo git -C gerrit/git/ clone --mirror ...`
+  - Update `groups` and groups in `project.config`
+    in branch `refs/meta/config`
+* Import foreign server IDs if needed, e.g.
+  `sudo git config -f gerrit/etc/gerrit.config --add gerrit.importedServerId fb9ff590-4b50-4f01-be71-0aafd704c4b4`
+* Import foreign account IDs:
+  - Check out refs/meta/external-ids` of `All-Users.git`
+  - `sha1sum` the imported ID, e.g. `echo -n imported:1000000@fb9ff590-4b50-4f01-be71-0aafd704c4b4 | sha1sum`
+  - Use SHA1 sum as filename, contents:
+    [externalId "imported:1000000@fb9ff590-4b50-4f01-be71-0aafd704c4b4"]
+	accountId = 1000123
+  - import_account_id() {
+	imported=imported:$1
+	sha1=$(printf "%s" ${imported} | sha1sum | awk '{ printf $1; }')
+	local=$2
+	printf "[externalId \"${imported}\"]\n\taccountId = ${local}\n" >${sha1}
+    }
+  - Commit & push
+* Restart containers