This article is now published on my website: A one-off git repo server.
Last active
April 21, 2023 07:33
-
Star
(140)
You must be signed in to star a gist -
Fork
(27)
You must be signed in to fork a gist
-
-
Save datagrok/5080545 to your computer and use it in GitHub Desktop.
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
A new built-in command git-serve
was added in Git 2.18, so the alias "serve" no longer works. Changing the alias to "server" is a simple workaround.
404 Not Found
nginx/1.18.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone wondering why simply running a http server in the repo directory is a bad idea: you have to ensure the repo is "packed" at all times by periodically running
git repack
, otherwise the clients will get some random old state of the repo