DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far...

Welcome! This is a Q&A website for computer programmers and users alike, focused on helping fellow programmers and users. Read more

What are you stuck on? Ask a question and hopefully somebody will be able to help you out!
+1 vote

I own a repository with thousands of commits, some are very big changes which means there are thousands of objects and gigabytes of data. I would like to know if any of this is possible, and if yes, how?

  • achieve the equivalent of "log rotation" for log files, such that older commits are automatically split into separate "historical" repositories, for example every 1000 or 10000 commits
  • automatically archive old history into a single, separate repository and keep only the last 1000 commits of a branch in the "current" repository
  • automatically delete old history, only keep the last 1000 commits of a branch

1 Answer

0 votes

I am unsure this is possible in any sense given that control version systems are not designed to be able to be broken or lose old commits.

I do think you can create new repositories from old commits via a workflow and a script making a list of commits, checking out any of them and creating and copying code in a new repository via API from some code forge.

However, I keep the same about my first idea.

ago by
Contributions licensed under CC0