简体   繁体   中英

disk space on build server when switching from svn to git

At the moment, we run a build server that checks out projects from SVN, builds them with Maven, deploys them and tags them in SVN. The project directories (checked out code and results of the last build) sum up to about 500GB.

I wonder whether we need a lot more when using git. If I understand this correctly, git does not only check out a copy of the "last version", but copies the complete history. So after a while, our build server will hold a complete copy of all git repositories.

Is this correct? Or am I mistaken?

By default git clones the entire history. But it's quite configurable.You can do shallow clone with git clone --depth=N , ie clone only a few latest commits. Public commercial CI/CD services usually do --depth=50 to be on the safe side but you can experiment with lesser depth. For many projects --depth=1 is enough.

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