Live data from Hacker News

You already have a Git server

maurycyz.com

241–250 of 454 posts

Re: You already have a Git server

#241

Earlier quoted context omitted.

That's because git is hard to use and full of commands which are making no sense. Eventually people will learn to just clone, pull, push and occasionally merge and be done with it.

Most people would just use `app` `app (final)`, `app (final 2)`, etc... VCS exists for a reason and I strongly believe that the intersection of people that say git is hard and people that do not know why you want a VCS is nearly a perfect circle.

Being a useful tool does not justify having an extremely inconsistent and unnecessarily confusing UI.

Re: You already have a Git server

#242

Earlier quoted context omitted.

If you do it over NFS or whatever then you can collaborate as well.

git over nfs ... not the very best idea.

I haven't tried it, but I think it's fine if only one person has write access to any given clone. You can pull back and forth between clones freely. It's if you have two Git clients trying to write to the same repo that you'll have problems.

Re: You already have a Git server

#243

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

I don't think it has anything to do with being old, this is what happens when your software gets too complex that nobody even knows the very basics. This is highlighted with the documentation, if the software's documentation becomes lengthy enough that it could be an entire book, you're going to be getting these sorts of articles from time to time. Another highlight is bash, that is a huge man page for what should be a shell.

Re: You already have a Git server

#244

Earlier quoted context omitted.

I didn’t know either - or rather, I had never stopped to consider what a server needs to do to expose a git repo. But more importantly, I’m not sure why I would want to deploy something by pushing changes to the server. In my mental model the repo contains the SOT, and whatever’s running on the server is ephemeral, so I don’t want to mix those two things. I guess it’s more comfortable than scp-ing individual files fo…

There's a lot of configuration possible due to the fact that git is decentralized. I have a copy on my computer which is where I do work. Another on a vps for backup. Then one on the app server which only tracks the `prod` branch. The latter is actually bare, but there's a worktree for the app itself. The worktree is updated via a post-receive hook and I deploy change via a simple `git push server prod`

You actually led me into a dive to learn what worktrees are, how bare repos + worktrees behave differently from a regular clone and how a repo behaves when it’s at the receiving end of a push, so thanks for that!

I’ve never worked with decentralized repos, patches and the like. I think it’s a good moment to grab a book and relearn git beyond shallow usage - and I suspect its interface is a bit too leaky to grok it without understanding the way it works under the hood.

Re: You already have a Git server

#246

Earlier quoted context omitted.

When this kind of “sliding” happens it’s usually because the base implementation was missing functionality. Turns out CLI interfaces by themselves are (from a usability perspective) incomplete for the kind of collaboration git was designed to facilitate.

In another post discussion, someone suggested git as an alternative to overleaf, a Google Docs for latex... I guess there are plenty of people with blind spots for things that are technically possible, and usabel to experts, and UI that actually empowers much broader classes of users to wield the feature.

Is the joke that overleaf has decent git integration?

Re: You already have a Git server

#247

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!

Once they killed mercurial on bitbucket, it was over.

Re: You already have a Git server

#248

Beware of using this to publish static sites: you can accidentally expose your .git directory to the public internet. I got pwned this way before (by a pentester fortunately). I had to configure Apache to block the .git directory.

But what, exactly, was pwned? Did you have secrets in the git repo?

No secrets like auth credentials or tokens but:

- Deleted files and development artifacts that were never meant to go public.

- My name and email address.

- Cringy commit messages.

I assumed these commits and their metadata would be private.

It was embarrassing. I was in high school, I was a noob.

Re: You already have a Git server

#249
post #71

My git "server" is a folder of bare git repositories in home directory which I share with Syncthing. It'd be great if there was more specific support. But in practice? No problems so far.

Perhaps the only issue with this setup is that you lose some of the robustness of git: mess up one repo beoynd repair, and you've just messed up all the checkouts everywhere.

I sync my repos manually (using GitHub as the always-on remote, but I'm not particularly attached to it). This gives me more resilience should I blow up the repo completely (hard to do, I know).

Re: You already have a Git server

#250
post #3

Interesting. I am just trying to decide between self-hosting Forgejo and other options for hosting Git in own private network.

I really like forgejo, but the git hosting bit is really just one feature for me. Their ci/cd runners, package repos and such are all things I need and forgejo includes in one nice bundle.

If I was just using it for git hosting I'd probably go for something more light weight to be honest.

Post reply on HN