如何在 Windows 上启动 git 守护进程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5186070/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 08:08:26  来源:igfitidea点击:

How to start git daemon on Windows

windowsgitwindows-server-2008

提问by A-Dubb

How do I start the git daemon on Windows in order to allow it to begin serving requests? Seems like msysgit is supposed to install it as a Windows Service or something but I don't see one.

如何在 Windows 上启动 git 守护进程以允许它开始处理请求?似乎 msysgit 应该将它安装为 Windows 服务或其他东西,但我没有看到。

回答by patthoyts

Git for Windows 1.7.4 includes support for git daemon on windows which was missing in previous versions. To export your repository you will need to create a file called git-daemon-export-ok in the .git directory or include the --export-all command line option.

适用于 Windows 1.7.4 的 Git 包括对 Windows 上的 git 守护程序的支持,这在以前的版本中是缺失的。要导出您的存储库,您需要在 .git 目录中创建一个名为 git-daemon-export-ok 的文件或包含 --export-all 命令行选项。

In a git repository run:git daemon --export-alland you can then connect to it from a remote machine eg: git ls-remote git://yourmachine/path/to/repo

在 git 存储库中运行:git daemon --export-all然后您可以从远程机器连接到它,例如:git ls-remote git://yourmachine/path/to/repo

回答by sdorra

You could use SCM-Managerinstead of git daemon.

您可以使用SCM-Manager而不是 git daemon。