简体   繁体   English

Gitignore man目录中的R包?

[英]Gitignore man directory of an R package?

Because each and every file in the man/ directory of an R package is automatically written with package roxygen2 , I wonder what would prevent me from adding the entire directory to my .gitignore . 因为R包的man/目录中的每个文件都是使用roxygen2包自动编写的,所以我想知道是什么会阻止我将整个目录添加到.gitignore

In other words, why all R packages on GitHub still version the man/ directory? 换句话说,为什么GitHub上的所有R包仍然对man/目录进行版本控制?

As a convenience to users who use devtools::install_github() . 为了方便使用devtools::install_github()

If man/*.Rd is not in the repo, they will get a note like No man pages found in package... upon install and later, help(...) or ?... or ??... will fail for your users with No documentation or No results found . 如果man/*.Rd不在仓库中,他们将得到一条注释,例如在安装时及以后的No man pages found in package... help(...)?...??...将对您的用户而言失败, No documentationNo results found

If you want the man directory to be present but not the files generated in it, place a .gitignore file in the man directory. 如果要显示man目录而不显示其中生成的文件,请将.gitignore文件放在man目录中。 This will force git to generate the directory, but still ignore the files generated. 这将强制git生成目录,但仍然忽略生成的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM