Update: Removed the running totals. I'll summarize later, didn't expect this to be quite so popular.
Also, I use Git for large academic projects and papers in LaTeX, so public Github is not really ideal.
GitHub seems to be the second-best option ( sometimes the first ), but when you have unlimited non-paid private repos your mind goes also unlimited : I serve my important configuration files, various scripts, small personal projects, even my bank statements on a git repo, hosted on my personal server. But if every repo costed me 2$ per month, I doubt I would do that.
Bitbucket charges per user and not per repo (the github model) which scales well while keeping cost in control.
It's great, not really expensive, almost every developer knows how it works.
Simply setting up your own Git repo would be more expensive than a few months of GitHub/BitBucket subscription.
If it fits in BitBucket's free plan or you're solo, use that. It'll just work.
If it doesn't fit in BitBucket's free plan, pay for GitHub (sorry BitBucket).
If you need it behind your firewall and want to manage yourself, you can afford to (and should do) an eval of solutions like GitLab.
If you need it behind your firewall and your org is already large and complicated, then try GitHub enterprise.
I use Stash at one client and like it, especially when integrated with JIRA. Not that I have much love for JIRA, but if you track all details, it's the tool to go for.
I would have considered the micro plan if it weren't for the 5 repo limit -- I am (sadly) not rich enough to pay them just for being nice if I can get the number of private repos I need for free elsewhere.
on the upside, you learn a bunch about ssh in the process!
Of course it's my responsibility to patch software I'm using, but after considering how much time I would need to run gitlab on my own host ( incl. server upgrade, security configuration, may be kernel + docker installation, etc. ) I decided to go to a paid repo at GitHub.
Anyway free hosting for me for a platform that you can install on your server has always been a no-option, because I want to control the content.
The 24 hour dev cycle is upon us and it's important to make sure these tools work on both sides of the planet.
Current summary stats for private repos:
* Paid GitHub: 9
* Free+Paid BitBucket: 14
* Hosted+Self-hosted GitLab: 8
Fast, very low resource usage, easy to install.
And even if you've got it all set up: how are you supposed to update your install? IIRC, i've read somewhere that you're supposed to wipe & reinstall the whole thing (take this with a grain of salt, haven't used my install that much as Gogs is still way buggier than, say, GitLab).
No wipe, just overwrite some files and that's it.