Live data from Hacker News

You already have a Git server

maurycyz.com

351–360 of 454 posts

Re: You already have a Git server

#351

I feel like something was lost along the way. git init —-bare will give you a git repo without a working set (just the contents typically in the .git directory). This allows you to create things like `foo.git` instead of `foo/.git`. “origin” is also just the default name for the cloned remote. It could be called anything, and you can have as many remotes as you’d like. You can even namespace where you push back to th…

Yes, I encourage my co-workers, when pushing to a common repo, to use `$user/$whatever` exactly to have their own namespace. The main selling point I'm making is that it makes cleanup of old branches easier, and less conflict-prone.

Tangentially related: when you have multiple local checkouts, often `git worktree` is more convenient than having completely independent local repository. See https://git-scm.com/docs/git-worktree

Re: You already have a Git server

#352

I remember the first time I tried git, circa 2006, and the first 3 commands I tried were: git init git commit -am Initial\ commit git clone . ssh://server/path/to/repo And it didn’t work. You have to ssh to the remote server and “git init” on a path first. How uncivilized. Bitkeeper and a few other contemporaries would let you just push to a remote path that doesn’t exist yet and it’d create it. Maybe git added this…

[flagged]

Re: You already have a Git server

#353
post #310

Earlier quoted context omitted.

This is classic git usage. A "pull request" was literally just asking someone to pull from your branch. GitHub co-opted the term for their own thing. The thing that people really don't seem to get these days is how your master branch is a different branch from someone else's master branch. So pulling from one master to another was a normal thing. When you clone you get a copy of all the branches. You can commit to yo…

On GitHub, too, a "pull request" is literally just asking someone to pull from your branch.

Isn't it asking someone to pull your branch (if forked) then merge it into to master

Re: You already have a Git server

#354
post #295
post #48

Earlier quoted context omitted.

Not yet, unfortunately. Mostly due to protocol limitations—we use AT ( https://atproto.com ) for federation.

can tangled support a forum-styled or subreddit-like thread discussion interface, on a per-repo basis so that "anyone could start a subreddit" via creating a discussion-only repo?

Wondering if something like this could be implemented on tangled with public-inbox:

https://public-inbox.org/README.html

> public-inbox implements the sharing of an email inbox via git to complement or replace traditional mailing lists. Readers may read via NNTP, IMAP, POP3, Atom feeds or HTML archives.

> public-inbox stores mail in git repositories as documented in https://public-inbox.org/public-inbox-v2-format.txt and https://public-inbox.org/public-inbox-v1-format.txt

> By storing (and optionally) exposing an inbox via git, it is fast and efficient to host and mirror public-inboxes.

Re: You already have a Git server

#355

Earlier quoted context omitted.

git clone --mirror is another good one to know, it also makes a bare repository that is an exact clone (including all branches, tags, notes, etc) of a remote repo. Unlike a normal clone that is set up for local tracking branches of the remote. It doesn't include pull requests, when cloning from github, though.

> 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?

Wasn't that how it worked before Microsoft bought Github?

Re: You already have a Git server

#356
Some time ago, I was on a team of researchers collaborating with a hospital to build some ML models for them. I joined the project somewhat late. There was a big fuss over the fact that the hospital servers were not connected to the internet, so the researchers couldn't use GitHub, so they had been stalled for months. I told them that before GitHub there was `git`, and it is already on the servers... I "set up" a git system for them.

Re: You already have a Git server

#357
post #324

Earlier quoted context omitted.

If your purpose for self-hosting is fear that GitHub will ignore their own promises in their terms of service and abuse their custody of your data then sure. https://docs.github.com/en/site-policy/github-terms/github-t... (There's also the "to comply with our legal obligations" bit, which is a concern if you're doing things that governments around the world may have issue with.) I expect there are people who like to…

That's not accurate. I've had one of my own accounts blocked, with zero access until I talked to their support and convinced them I was, in fact, a real person. At that moment, if I had any important private repos, they would be gone.

That's no reason not to use them as a third offsite backup on top of your laptop and your own server hosting, which is what I'm suggesting here.

Re: You already have a Git server

#358
post #295
post #48

Earlier quoted context omitted.

Not yet, unfortunately. Mostly due to protocol limitations—we use AT ( https://atproto.com ) for federation.

can tangled support a forum-styled or subreddit-like thread discussion interface, on a per-repo basis so that "anyone could start a subreddit" via creating a discussion-only repo?

We’ve considered this a lot. Our issues implementation is threaded—perhaps more Stack Overflow-like. We’re thinking of renaming it to Discussions, and having the actual issue tracker be collaborators-only.

Re: You already have a Git server

#359
post #317

Earlier quoted context omitted.

I'm assuming a "patch" is a group of commits. So would a "patch series" be similar to GitLabs notion of dependent MRs?

You normally have one patch per commit. The patch is the diff between that commit and its parent. (I forget how git format-patch handles the case where there are two parents.)

> (I forget how git format-patch handles the case where there are two parents.)

As per [0] merge commits are dropped:

Note that format-patch will omit merge commits from the output, even if they are part of the requested range. A simple "patch" does not include enough information for the receiving end to reproduce the same merge commit.

I originally thought it would use --first-parent (so just diff vs the first parent, which is what I would want) but apparently no! It is possible to get this behaviour using git log as detailed in this great write-up [1].

[0] https://git-scm.com/docs/git-format-patch#_caveats

[1] https://stackoverflow.com/questions/2285699/git-how-to-creat...

Re: You already have a Git server

#360

Earlier quoted context omitted.

The code is considered IP of the corp and they probably have rules around how or where IP should be shared, access controls etc.

There is nothing inherently special about code, than say, a confidential marketing deck or sales plan. If they can go a network drive, or a service like One Drive , why can't we put our code there? I'm not talking about the Xbox firmware or the entire Windows source. This is about little one-off projects, highly specialized tooling, or experimental proof-of-concepts that are blocked by bureaucracy. It's a misguided p…

OP is fully soaked with corp bullshit. A fellow sellout! Please read this: https://geohot.github.io/blog/jekyll/update/2025/10/15/pathe...
Post reply on HN