Hacker News new | ask | show | jobs
by dotancohen 16 days ago
Pushing and pulling from a git instance without a working directory on a server is seriously fast and robust.

Try `git init --bare --shared`. You'll never pay for GitHub again.

2 comments

My point isn't that trivial git is slow, that's perfectly fast enough. My point is that when you've got a big repo, a bunch of committers, need multiple serving machines/replicas, consistency, etc, git is slow.

GitHub is the best implementation of that which I have seen, and GitHub even started to get pretty slow on a repo with >100k commits.

Git is breaking, and I don't know if there's any saving it at this point.

now compare that to just `hg init` for the same effect. Git is so damn powerful!
You actually could have the same effect as `hg init` with `git init`, but the command I mentioned leaves no working directory so uses less space on the server. Potentially hundreds of megs of disk space are worth a dozen keystrokes, no?
If you absolutely want nothing checked out, `hg update null`. Again "bare repos" are an absolutely unnecessary cognitive burden an UX papercut just like many things git.
You don't have to use bare repos, I just prefer them. You can use `git init` and ignore the working directory, just like you apparently [can] do in hg.
JFTR, it used to matter for push-ability whether it's bare or not, it appears to have changed in the recent years.