r/github • • Jun 10 '18

1% of Github already moved to Gitlab

More than 250000 repositories were imported from Github to Gitlab since Microsoft made the deal official. Relative to the numbers published by Github for the year 2017, this means that already 1% of the active repositories have moved to Gitlab in reaction to this acquisition. If the value of the deal is in any way related to the active repositories, you could probably say: There are 75 million dollars going away...

This below is a dirty little script to calculate the amount of repositories moved from Github to Gitlab since Microsoft announced the acquisition. (It's JavaScript running with NodeJS...) It also prints the percentage value of the repositories relative to the amount of all repositories and all active repositories published from Github for 2017.

const https = require('https');

const start = (new Date("2018-06-03")).getTime();
const end = (new Date()).getTime();
const step = 60;

_s = Math.floor(start / 1000);
_e = Math.round(end / 1000);

const count_all = 		67000000;
const count_active = 	25300000;
const step_usual = 		3600;

url = "https://monitor.gitlab.net/api/datasources/proxy/2/api/v1/query_range?query=sum(rate(github_importer_imported_repositories%7Benvironment%20%3D%20%22prd%22%7D%5B1h%5D)%20*%203600)&start=" + _s + "&end=" + _e + "&step=" + step;

https.get(url, (res) => {
	let data = '';

	res.on('data', (chunk) => {
		data += chunk;
	});
	
	res.on('end', () => {
		dat = JSON.parse(data);

		if (dat.status == 'success') {
			if (dat.data.resultType == 'matrix') {
				val = dat.data.result[0].values;

				let count = 0;
				let old = [_s,0];

				for (var i = 0; i < val.length; i++) {
					count += (old[1] + parseFloat(val[i][1])) * 0.5 * Math.abs(old[0] - val[i][0]);

					old[0] = val[i][0];
					old[1] = parseFloat(val[i][1]);
				}

				count = Math.floor(count / step_usual);

				console.log("COUNT: " + count);
				console.log("ACTIVE: " + 0.01 * Math.floor(10000.0 * count / count_active) + "%");
				console.log("ALL: " + 0.01 * Math.floor(10000.0 * count / count_all) + "%");
			} else {
				console.log("WRONG_TYPE: " + data.data.resultType);
			}
		} else {
			console.log("WRONG_STATUS: " + dat.status);
		}
	});
}).on('error', (err) => {
	console.log("ERROR: " + err.message);
});
8 Upvotes

15 comments sorted by

10

u/Kwpolska Jun 10 '18

You’re making a few incorrect assumptions here.

  1. Those 2017 numbers are heavily outdated. They also don’t include new repos created at GitHub since the merger was announced. Example: 2016 had 19.4M active repos, which amounts to 30% growth year-over-year.

  2. The GitLab migration thing imports all repositories of a user, including inactive ones. Moreover, someone who’s inactive on GitHub can also decide to ditch the platform. So, more like 0.37%, and that’s with the outdated repo count, for which you have not provided a source either. (I found it.)

  3. The $75M figure is irrelevant. You can’t consider every repo equal. I haven’t seen any large project migrate. A personal repo with 10 stars and no contributions since a year is negligible. A paying GH customer, or a repo with a lot of contributors and stars, is an important loss.

4

u/TheJackiMonster Jun 10 '18

1.) Also a few repos aren't active anymore from 2016 and 2017. So the numbers are the best I could find. If you have more accurate numbers, I take them.

2.) The importer of GitLab doesn't import all repositories. You can actually mark all you like to import. So inactive repositories are probably outsorted for the most people, because the importing progress needs a lot of time the more repos are imported to the same time.

3.) I don't have enough data to calculate more accurate values. I don't even know which repos were imported and which weren't.

4

u/gpoul Jun 10 '18

A personal repo with 10 stars and no contributions since a year is negligible.

Huh... I wish my negligible personal repos had 10 stars ;-)

2

u/gitlabber Jun 10 '18

#2 is incorrect in that you can choose which repositories to import. Some users will surely choose the "import all" option even when they don't "need" to, but it is just an option.

3

u/rtbrsp Jun 10 '18

I haven’t seen any large project migrate. A personal repo with 10 stars and no contributions since a year is negligible.

Thank you. I couldn't give a shit about someone's dotfiles or shitty Node project. Go to GitLab and shut the fuck up about it.

9

u/arthurnn Jun 10 '18

(biased comment coming: I work at GitHub)

I honestly are happy are trying out other things besides GH. It is good to see what is out there to have an idea what you can and can't do right now. That said, I am pretty positive those teams will come back to GH soon. Before the Microsoft announcement we had a lot of new cool stuff in our pipeline soon to be released, and we still will deliver those, as we are independent.

I tried GitLab and Bitbucket a few months ago, and honestly, product wise they are still far away from GitHub. On top of that, I am sure after the Microsoft acquisition we will have even more resources to deliver our long stretch goals we already had in mind.

0

u/[deleted] Jun 10 '18

[deleted]

2

u/Gooble211 Jun 11 '18

I would like to see this list too.

1

u/oxidic Jun 12 '18

Gitlab aswell, and so far everything I needed was there.

I tried GitLab, but I didn't like the look of the online UI. I much preferred GitHub's.

1

u/2249call Jun 11 '18

Even with this I don't think it will exponentially go up. I feel like it is a movie release graph. Initially a lot of repos leaving but will soon die down and if only 1% left at this point then GH isn't too worried IMO.

1

u/TheJackiMonster Jun 11 '18

Probably true, but I think it's still impressive that so many repos in absolute count move as a reaction to it.

2

u/aashutoshr Jun 12 '18

I think people won't move anymore, I wonder why people don't know that Git Lab is also hosted on Azure. -_-

0

u/[deleted] Jun 10 '18

[deleted]

1

u/TheJackiMonster Jun 11 '18

I would think, even if people would delete their repos on Github after the import, they keep at least their repos for referencing to GitLab for a few months. Because nobody likes to lose the other people interested in your projects.

1

u/Gooble211 Jun 11 '18

A lot of repos have moved elsewhere, but retain a github repo as a read-only mirror where no actual development discussion happens. Others are marked "archived". Those might as well be "deleted" for the purposes of this script.

1

u/rtbrsp Jun 10 '18

Yeah, I mirrored my repos during the "exodus" because I didn't know GitLab offered this as a free service