Reputation: 633
We currently have a repo with around 40,000 commits and it's starting to have issues with gitlab, specifically with failing the weekly health check. It's a pretty old repo that's been running for years.
Since starting a new project would result in a new project ID causing issues with our issue tracker, would it be possible / a reasonable idea to do something like the following:
No one works directly on master and it's only used for deployment. When a MR is accepted, it gets squash merged into master, some files are updated, and a new tag is stamped with the next version id. All running processes use the tag as a checkout point instead of just the master branch.
In the end, would this do anything to help, or just mess things up?
Upvotes: 0
Views: 55
Reputation: 1211
As suggested by Asif Kamran Malick, an orphan branch can help:
git checkout master
git checkout -b backup
git branch -D master
git checkout --orphan master
git commit --all -m "Add latest files in one fresh commit"
Still, this is a rather rough procedure, so make sure all collegues use the new master for new features (otherwise you'll merge in all the history again) and be ready to deal with hickups in the transition period.
Upvotes: 1