by rdtsc · 12y ago · 0 comments
Remember at work when Github goes down everyone is just sitting there twiddling their thumbs for hours. As in "yeah my commit is ready just waiting to push it" or "waiting for the issue to be close, then we can test".
It is ironic a bit isn't it. One of Git's major selling points was -- we are tired of one centralized version system, you shouldn't need a single point of failure or be tied to the network in order to develop. And then years later we have one giant global single point of failure across the world. There is some irony there.
(Yeah, yeah, I know I can commit locally. But at some point you'll need to update issues, and publish your changes. This is more a of a generalized point. It would be the same if bitbucket went down and so on. We never it seems have gotten to the mythical peer 2 peer internet of things -- it just doesn't work it seems).
The second part is solved. You just need a second git server. Maybe Bitbucket, or maybe your own. We just never do it though, for reasons I don't know either. I don't do it, even if I know how. There are multiple tools to push to different servers automatically, but we still go the comfortable route. Maybe it's the psychological thing that "if Github goes down it won't be for long, is it really going to affect me?".
Because of that I don't agree the tools are the problem though. Or even that they are part of some irony. Git delivers on its promise. People just don't use it like that.
The issues part or the dependency with Github to test/deploy software is more of a vendor lock in situation. A lot of people depend on it being up to work, but that's the convenience charge since Github isn't open source. Not much different from people depending on Heroku to be up for their application to function.
For instance, have a Github repo but also a personal Git server and Bitbucket. Whenever you do `git push`, it'd update all three. And all three would be in sync.
You can create a single remote called "all" that has all your servers URLs. Then you can just push to that one, like "git push all", and all your servers will update. Pretty much the simplest, you just need to edit the .git/config.
You can set up a mirror too ("git remote add foobar --mirror=push ..."), but I've never done that.
Or make a hook so that whenever you push to a remote it also pushes to another.
There's also mr[1], which I've heard of but not used.
There are ways aplenty, we just neglect to use them.
However... having multiple remotes is a very easy way to get multiple distributed backups of your code. (You should do a "git fsck" on all your mirrors at least semi-regularly. The reason has to do with how push and --mirror work.)
However, there is something to be said about mirroring canonical repositories for accessibility.
If github goes down and your devs are twiddling their thumbs because they can't push, you have larger problems.
Yeah, I have been using it for about 5 years. I know how git works
> Many popular projects push their code to multiple services
What does that mean "multiple services"? Multiple machines?
You can reference (and thus comment on) and close issues from your commit messages.
> and publish your changes.
That does not require sitting on your ass and doing nothing though.
But of course it is their fault for not having anything else to do and so someone on HN tells them that, "Well trust me this is totally fine, you guys and gals just need to do something else at the moment. Don't think of it as a bug, it is a feature built it to help you multitask..."