How to truncate commit history? #1326
Unanswered
LittleTigered
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@LittleTigered as far as I am aware, the transfer protocol passes the w.writer = new(idxfile.Writer)
var err error
w.parser = packfile.NewParser(w.synced, packfile.WithScannerObservers(w.writer))
h, err := w.parser.Parse()
if err != nil {
w.result <- err
return
}
I am not completely sure what you are trying to achieve. But it seems like either shallow clones or partial clones are potential options. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a repository with a very long history(20 years, over a hundred million objects), and it takes several hours to generate the .idx file during a full clone. I'm looking for ways to speed up this process. I have two ideas:
Git clone transmits .pack and .idx files simultaneously,allowing the client to bypass the time-consuming git index-pack phase. However, it appears that the Git transfer protocol only supports transmitting the .pack file, can I do this using go-git?
Is it possible to discard the commit history before a certain point in time, while keeping the commit IDs unchanged for those after that point (shallow clone is not an option, as I am on the server) BTW I cannot use common optimization methods like git-lfs or rewriting history because the historical versions are already depended upon by other systems and cannot be rewritten.
I know this is not a problem with go-git, any suggestions for solving the issue of Git repository bloat?
Beta Was this translation helpful? Give feedback.
All reactions