Live data from Hacker News

You already have a Git server

maurycyz.com

201–210 of 454 posts

Re: You already have a Git server

#202
post #130

Earlier quoted context omitted.

I like this comment. Over the years I've always found that whenever I see others using git, everyone uses it in different way and even for different purposes. This has left me really confused about what is the standard practice of Git exactly.

This is because people have different needs, Git is trying to cover too many things, there are multiple ways to achieve goals and therefore there is no standard practice. There is no single, standard way to cook chicken breast and that is a way simpler thing. The solution is to set team/department standards inside companies or use whatever you need as a single contributor. I saw attempts to standardize across a compa…

> there are multiple ways to achieve goals and therefore there is no standard practice

This is ultimately where, and why, github succeeded. It's not that it was free for open source. It's that it ironed out lots of kinks in a common group flow.

Git is a cultural miracle, and maybe it wouldn't have got its early traction if it had been overly prescriptive or proscriptive, but more focus on those workflows earlier on would have changed history.

Re: You already have a Git server

#203
> It’s also backed up by default: If the server breaks, I’ve still got the copy on my laptop, and if my laptop breaks, I can download everything from the server.

This is true, but I do also like having backups that are entirely decoupled from my own infrastructure. GitHub personal private accounts are free and I believe they store your data redundantly in more than one region.

I imagine there's a way to setup a hook on your own server such that any pushes are then pushed to a GitHub copy without you having to do anything else yourself.

Re: You already have a Git server

#204
post #149

Cannot emphasize this whole notion enough; Very roughly, Github is to git what gmail is to email. It's mostly probably fine if that's the thing most of everybody wants to use and it works well; but also it's very unwise to forget that the point was NEVER to have a deeply centralized thing -- and that idea is BUILT into the very structure of all of it.

Idk if git was designed to not be used in a centralized way. Like all other common CLIs, it was simply designed to work on your PC or server without caring who you are, and nothing stopped a corp from turning it into a product. Torvalds made git and Linux, then he put Linux on Github.

It's not a "CLI" and yes, "decentralized" was literally one of the points of it.

Re: You already have a Git server

#205
post #149

Cannot emphasize this whole notion enough; Very roughly, Github is to git what gmail is to email. It's mostly probably fine if that's the thing most of everybody wants to use and it works well; but also it's very unwise to forget that the point was NEVER to have a deeply centralized thing -- and that idea is BUILT into the very structure of all of it.

This reminded me of another discussion on HN a few months ago. Wherein I was reflecting on how the entire culture of internet standards has changed over time: "In the 80s and 90s (and before), it was mainly academics working in the public interest, and hobbyist hackers. Think Tim Berners-Lee, Vint Cerf, IETF for web/internet standards, or Dave Winer with RSS. In the 00s onward, it was well-funded corporations and the…

Yes. And honestly though, this is the sort of thing that makes me generally proclaim that Free Software and Open Source won.

It was extremely unlikely that it would be some kind of free utopia; but also, it's extremely remarkable what we've been able to keep generally free, or at least with a free-enough option.

Re: You already have a Git server

#207

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

Depends on what you mean by using etc. If somebody asked me if it's possible to scp my git repo over to another box and use it there or vice versa, I would have said, yes, that is possible. Although I would've felt uneasy doing that. If somebody asked me if git clone ssh:// ... would definitely work, I wouldn't have known out of the gate, although I would have thought it would be neat if it did and maybe it does. I m…

Am I misreading your comment?

You’ve always used GitHub but never known it could work over ssh? Isn’t it the default method of cloning when you’re signed in and working on your own repository…?

Re: You already have a Git server

#208
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)

[deleted]

Re: You already have a Git server

#209

Earlier quoted context omitted.

Git is distributed, meaning every copy is isolated and does not depends on other's copy. Adding remotes to an instance is mostly giving a name to an URL(URI?) for the fetch, pull, push operation, which exchange commits. As Commits are immutable and forms a chain, it's easy to know when two nodes diverge and conflict resolution can take place. From the git-fetch(1) manual page: > Git supports ssh, git, http, and https…

> There's no server. There IS a server, it's the ssh daemon. That's the bit I had never thought about until now.

The server is git itself, it contains two commands called git-receive-pack and git-upload-pack that it starts through ssh and communicate through stdin/out

Re: You already have a Git server

#210
Back when I started at my current job... 15 years ago... We had no central git server. No PR workflow. We just git pull-ed from each others machines. It worked better than you would expect.

We then went to using a central bare repo on a shared server, to hosted gitlab(? I think - it was Ruby and broke constantly) eventually landing on GitHub

Post reply on HN