I have Git repo which serves as an archive for a number of configs sourced from elsewhere:
Before anyone suggest I try breaking up this repo into smaller ones, that's not an option because customers.
The repo contains ~2 years worth of data but our customers only need last 90 days.
I have successfully grafted the root onto a commit 90 days ago using the method described here :
The problem is using git-filter-branch cleanup afterwards - it takes > 24 hours which is unacceptable downtime to users.
I would like to try bfg-repo-cleaner instead, but it's not clear to me:
PS : I am now aware that git checkout --orphan
would have been slightly more elegant, but it doesn't really change the problem that BFG
requires the repo be bare while checkout
requires it not be bare
Don't bother rewriting the repo. If someone only needs the last 90 days, run a script to estimate the required depth and have them create a shallow clone with --depth <depth>
.
BFG should be run on a mirror/bare clone.
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.