Search
Question: How do I clean .git folder?
0
gravatar for Mohamad S. Hasan
4 months ago by
Mohamad S. Hasan0 wrote:

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

ADD COMMENTlink modified 4 months ago by Martin Morgan ♦♦ 20k • written 4 months ago by Mohamad S. Hasan0
2
gravatar for Mike Smith
4 months ago by
Mike Smith2.1k
EMBL Heidelberg / de.NBI
Mike Smith2.1k wrote:

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 COMMENTlink written 4 months ago by Mike Smith2.1k
1
gravatar for Martin Morgan
4 months ago by
Martin Morgan ♦♦ 20k
United States
Martin Morgan ♦♦ 20k wrote:

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 COMMENTlink written 4 months ago by Martin Morgan ♦♦ 20k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 318 users visited in the last hour