What's best is probably hosting your own git server (for hopefully obvious reasons).
If you have the ability to host your own, then agreed 100% host your own. Microsoft proved that if companies are more than happy to mine your code
From personal experience, if you're hosting Gitlab and make it available to the internet, make sure to keep it updated or your server will be super slow hosting a crypto miner within a year.
Good advice for anything you're hosting!
Depends on what you're doing.
If you want free offsite backups, collaboration with others, integration with other tools, etc., then self-hosting is the worst option.
Though the topic is git forges, so then the question is which one do you self host?
What's best is probably hosting your own git server (for hopefully obvious reasons).
If you have the ability to host your own, then agreed 100% host your own. Microsoft proved that if companies are more than happy to mine your code
From personal experience, if you're hosting Gitlab and make it available to the internet, make sure to keep it updated or your server will be super slow hosting a crypto miner within a year.
Good advice for anything you're hosting!
Depends on what you're doing.
If you want free offsite backups, collaboration with others, integration with other tools, etc., then self-hosting is the worst option.
Though the topic is git forges, so then the question is which one do you self host?