Live data from Hacker News

You already have a Git server

maurycyz.com

391–400 of 454 posts

Re: You already have a Git server

#391

In interviews, I've literally asked senior devops engineers and senior software engineers if they have hosted their own git servers and how to initialise one and not a single one has mentioned git init --bare..... which is disconcerting. They can deploy appliances (like gitlab, gitea) and build pipelines just fine, but none of them realized how git actually works underneath and how simple it all is.

Why is that disconcerting? There's simply too much software to be familiar with obscure features like this

Because too many bad interviews are all about ensuring that the candidate knows the exact same 1% of CS/SWE knowledge as the interviewer.

Don't worry, karma dictates when the interviewer goes looking they'll get rejected for not knowing some similarly esoteric graph theory equation or the internal workings of a NIC card.

Too much of our interviewing is reading the interviewer's mind or already knowing the answer to a trick question.

The field is way too vast for anyone to even know a majority, and realistically it's extremely difficult to assess if someone is an expert in a different 1%.

Sometimes I feel like we need a system for just paying folks to see if they can do the job. Or an actually trusted credentialing system where folks can show what they've earned with badges and such.

A better interview question about this subject doesn't assume they have it memorized, but if they can find the answer in a short time with the internet or get paralyzed and give up. It's a very important skill to be able to recognize you are missing information and researching it on the Internet.

For example, one of my most talented engineers didn't really know that much about CS/SWE. However, he had some very talented buddies on a big discord server who could help him figure out anything. I kid you not, this kid with no degree and no experience other than making a small hobby video game would regularly tackle the most challenging projects we had. He'd just ask his buddies when he got stuck and they'd point him to the right blog posts and books. It was like he had a real life TRRPG Contacts stat. He was that hungry and smart enough to listen to his buddies, and then actually clever enough to learn on the job to figure it out. He got done more in a week than the next three engineers of his cohort combined (and this was before LLMs).

So maybe what we should test isn't data stored in the brain but ability to solve a problem given internet access.

Re: You already have a Git server

#392

Earlier quoted context omitted.

> given how cloning a remote repo only gives you a partial copy of the remote history When you clone you get the full remote history and all remote branches (by default). That’s painfully true when you have a repo with large binary blobs (and the reason git-lfs and others exist).

You're right, I got that part wrong, git actually fetches all of the remote commits (but not all of the refs, many things are missing, for instance notes). But a clone of your clone is not going to work the same way, since remote branches are not cloned by default, either. So it'll only have partial history. This is what I was thinking about.

Notes aren't refs.

Re: You already have a Git server

#393
post #85

git clone ssh://username@hostname/path/to/repo this is equivalent to: git clone username@hostname:path/to/repo and if your usernames match between local and remote: git clone hostname:path/to/repo (if the path has no leading /, it is relative to your home directory on the remote)

I never thought about this.. I've had the following problem in the past.

Host A, cannot reach official github.com. But Host B can and has a local copy of a repo cloned. So Host B can 'git clone ssh://' from Host A which is essentially equivalent, but just setting origin to Host B instead of github.com, sort of acting as a manual proxy?

What if Host A is natted, so Host B can ssh to Host A but not the reverse, can Host G ssh clone to Host A to push changes?

In the rare times I've needed this, I just 'rsync -av --delete' a repo from B->A.

Re: You already have a Git server

#394

I have been doing this for many years. If you want a public facing "read only" ui to public repositories you can use cgit ( https://git.zx2c4.com/cgit/about/ ) to expose them. That will enable others to git clone without using ssh. I keep my private repositories private and expose a few public ones using cgit.

I sent over a cgit web page for a take home assessment and the interviewer was horribly confused. I assume they have never seen anything apart from github before...

Re: You already have a Git server

#395

Earlier quoted context omitted.

If you share screen you are in control of what you show, if you give someone SSH access, what would stop them from passing/running a small script to fetch everything you have or doing w/e with your computer? I mean it's a blatant security violation to me. Just no reason to do that. In large corps you usually have policies to not leave your laptop unattended logged in, in the office, that would be potentially even wor…

I wasn't aware that I could run a small script and fetch everything from every host with an ssh git repo. TIL.

I mean…git hooks are just scripts. If you can fetch, you can pull (or push) a script that executes locally.

Re: You already have a Git server

#396
post #366

Earlier quoted context omitted.

It didn't really lose the original ideas. It just never learned that people don't want to use it the way kernel devs want to use it. Git never provided an easy github-like experience, so GitHub took over. Turns out devs in general are not into the "setup completely independent public mailing lists for projects" idea.

> Turns out devs in general are not into the "setup completely independent public mailing lists for projects" idea. My feeling is that devs in general are not into the "learning how to use tools" idea. They don't want to learn the git basics, they don't want to learn the cmake basics, ... I mean that as an observation more than a criticism. But to me, the fact that git was designed for those who want to learn powerfu…

> My feeling is that devs in general are not into the "learning how to use tools" idea.

Given the number of vim, emacs, nix, git, i3, etc. users who are proud of it and all the customisations they do, I don't think so. Like, there will be a decent group, but not generalisable to "devs".

Re: You already have a Git server

#397
post #224

Earlier quoted context omitted.

Having a web interface was really appreciated by users, it would seem.

>Having a web interface It's not the interface , it's the web hosting . People want a free destination server that's up 24/7 to store their repository. If it was only the web interface, people could locally install GitLab or Gitea to get a web browser UI. (Or use whatever modern IDE code editor to have a GUI instead of a CLI for git commands.) But doing that still doesn't solve what GitHub solves: a public server to…

GitHub and the others also handle user authentication and issue tracking, which aren’t part of Git itself.

Re: You already have a Git server

#398

Earlier quoted context omitted.

> It doesn't include pull requests, when cloning from github, though. Because GitHub pull requests are a proprietary, centralized, cloud-dependent reimplementation of `git request-pull`. How the "free software" world slid head first into a proprietary cloud-based "open source" world still boils my blood. Congrats, Microsoft loves and owns it all, isn't that what what we always wanted?

It still blows my mind how git has lost it's original ideas of decentralized development because of github and how github, a for-profit - centralized - close-sourced forge, became the center for lots of important open source projects. We need radicle, forgejo, gitea to catch up even more!

Git brings different things to different people.

For me the largest advantage of Git was being able to easily switch branches. Previously I'd have to have multiple copies of an entire source repo on my machine if I wanted to work on multiple things at the same time. Likewise a patch set going through CR meant an entire folder on my machine was frozen until I got feed back.

Not having to email complex patches was another huge plus. I was at Microsoft at the time and they had home made scripts (probably Perl or VBS, but I forget what) that applied patches to a repo.

It sucked.

Git branch alone was worth the cost of changing over.

Re: You already have a Git server

#399

Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?

I think if you're too young to know the earlier alternatives it's easy to overlook the distributed nature of git which made it different from them.
Post reply on HN