posts:one-off-git-daemon: Add a git://192.168.1.2/ example
[blog.git] / posts / One-off_Git_daemon.mdwn
index 5ebbf60af1d0ebd791efd947f8e49f8acb8d83e6..e587e2f776f02157ebfd48459c8a8495108b4897 100644 (file)
@@ -25,5 +25,20 @@ Then you can clone with:
 replacing `192.168.1.2` with your public IP address (e.g. from `ip
 addr show scope global`).
 
+If you don't want to bother listing `my-project` in your URLs, you can
+base the daemon in the project itself (instead of in the parent
+directory):
+
+    $ cd
+    $ git daemon --export-all --base-path=src/my-project --verbose
+
+Then you can clone with:
+
+    $ git clone git://192.168.1.2/
+
+This may be more convenient if you're only sharing a single
+repository.
+
+
 [[!tag tags/linux]]
 [[!tag tags/tools]]