How do I clean .git folder?
2
0
Entering edit mode
@mohamad-s-hasan-13264
Last seen 4.4 years ago

Hi,

I use GitHub to submit and update my R packages. Bioconductor requires that the tarball size should be less than 5MB. My original package is less than 1MB but the .git directory is about 97MB. How do I clean the .git directory?

Note that my Bioconductor issue number is 395.

 

Thank you

Git github • 2.8k views
ADD COMMENT
2
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 6 hours ago
EMBL Heidelberg

It's better to direct questions about package development to the Bioc-devel mailing list (https://stat.ethz.ch/mailman/listinfo/bioc-devel), rather than asking them here.

In this case I don't think you really want to 'clean' the .git directory, but rather want to ignore it when building.  You can do this with a .Rbuildignore file, which is discussed here or here for example.

ADD COMMENT
1
Entering edit mode
@martin-morgan-1513
Last seen 22 hours ago
United States

The git repository can be large if in the past you committed a big file, but then removed it. Git of course remembers the history of the large file, making your repository large. Use bfg to remove the file. It's important that all clones of the repository have the large file removed, otherwise a push from a clone with the large file will restore it.

ADD COMMENT

Login before adding your answer.

Traffic: 486 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6