简体   繁体   中英

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 .

In other words, why all R packages on GitHub still version the man/ directory?

As a convenience to users who use 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 .

If you want the man directory to be present but not the files generated in it, place a .gitignore file in the man directory. This will force git to generate the directory, but still ignore the files generated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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