git 描述文件中应该包含什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6866838/
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 should be in the git description file?
提问by Philip Oakley
After initialising a new local repo there is a description
file present.
初始化新的本地存储库后,存在一个description
文件。
What is it used for and how should I format it? Or is it simply a local helper file.
它的用途是什么,我应该如何格式化它?或者它只是一个本地帮助文件。
This thread Accessing git's `description' filesuggests one style, but no man page or other reference to why it should be the way it is.
这个线程访问 git 的“描述”文件建议了一种风格,但没有手册页或其他参考说明为什么它应该是这样的。
采纳答案by manojlds
description
file is only used by the GitWeb program ( to display the description of the repo on the GitWeb page)
description
文件仅供 GitWeb 程序使用(用于在 GitWeb 页面上显示 repo 的描述)
https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain
https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain
Otherwise, how you use it is left to you and I don't see a point in a "style" for it.
否则,你如何使用它取决于你,我看不出它的“风格”有什么意义。
回答by mindthief
The description
file can also be read by hook scripts or other scripts pertaining to the repository. For example, one popular hook script, post-receive-email, sends an email to all members when a commit is made to the repository, and uses the contents of the description
file as the name of the repository in the email subject.
该description
文件也可以由钩子脚本或与存储库相关的其他脚本读取。例如,一个流行的钩子脚本post-receive-email在对存储库进行提交时向所有成员发送一封电子邮件,并使用description
文件的内容作为电子邮件主题中的存储库名称。
回答by jkj
descriptionis just a text file that is shown as project description in web frontend.
description只是一个文本文件,在 Web 前端显示为项目描述。
Just write there something that explains what the repository is about.
只需在那里写一些东西来解释存储库的内容。
回答by jmarcio
The content of this file is also used by gitolite with the "desc -ld" command.
gitolite 也使用“desc -ld”命令使用此文件的内容。
you can modify this file, but it doesn't seem to me that it's taken into account to be commited.
您可以修改此文件,但在我看来,它并未考虑提交。