git update-server-info 有什么作用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2085402/
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
What does git update-server-info do?
提问by Ben
What does git update-server-info do? How do I know if I need it? The manual says:
git update-server-info 有什么作用?我怎么知道我是否需要它?手册上说:
A dumb server that does not do on-the-fly pack generations must have some auxiliary information files in $GIT_DIR/info and $GIT_OBJECT_DIRECTORY/info directories to help clients discover what references and packs the server has. This command generates such auxiliary files.
不进行动态包生成的哑服务器必须在 $GIT_DIR/info 和 $GIT_OBJECT_DIRECTORY/info 目录中有一些辅助信息文件,以帮助客户端发现服务器有哪些引用和包。此命令生成此类辅助文件。
How do I know if my server is dumb, and whether it does or does not do "on-the-fly pack generations", and whether it "must have some auxiliary information files"?
我怎么知道我的服务器是不是哑巴,它是否会“即时打包生成”,以及它是否“必须有一些辅助信息文件”?
I am pushing a web app via ssh to a bare repository, then pulling from that bare repository into the web root.
我正在通过 ssh 将 Web 应用程序推送到裸存储库,然后从该裸存储库拉入 Web 根目录。
采纳答案by Peter Eisentraut
Dumb server basically means accessed over HTTP. So if you access your Git repository over http:
or https:
URLs, you need the update-server-info
business, otherwise (git:
, ssh:
, etc.) you don't need it.
哑服务器基本上意味着通过 HTTP 访问。所以,如果你访问你的Git仓库上http:
或https:
网址,你需要的update-server-info
业务,否则(git:
,ssh:
等等),你不需要它。