Live data from Hacker News

You already have a Git server

maurycyz.com

151–160 of 454 posts

Re: You already have a Git server

#151
post #9

I've used Git over SSH for several years for personal projects. It just works with no additional overhead or maintenance. Tip: create a `git` user on the server and set its shell to `git-shell`. E.g.: sudo useradd -m -g git -d /home/git -s /usr/bin/git-shell git You might also want to restrict its directory and command access in the sshd config for extra security. Then, when you need to create a new repository you ru…

Yes, that's how I use it too.

However, this setup doesn't work with git-lfs (large file support). Or, at least I haven't been able to get it working.

PS: Even though git-shell is very restricted you can still put shell commands in ~/git-shell-commands

Re: You already have a Git server

#152

Earlier quoted context omitted.

My theory is that git is just so easy to use without understanding it that you end up with lots of people using it without understanding it :)

It's not "so easy to use without understanding it", it's the opposite it has so much unnecessary complexity (on top of a brilliant simple idea btw), that once people learn how to do what they need, they stop trying to learn any more from the pile of weirdness that is git. Decades from now, git will be looked back at in a similar but worse version of the way SQL often is -- a terrible interface over a wonderful idea.

I don't think that's true. In my experience it takes time, but once it clicks, it clicks. Sure, there is a bunch of weirdness in there as well, but that starts way further than where your typical git user stops.

I don't think git would end up this popular if it didn't allow to be used in a basic way by just memorizing a few commands without having to understand its repository model (however simple) well.

Re: You already have a Git server

#153

I am surprised how little software engineers (even those that use) know about git.

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.

People said the same thing about “advanced” operations with cvs and svn (and just called their admin for p4 or source safe). But I really don’t understand the sentiment.

Managing code is one of the cornerstones of software engineering. It would be like refusing to learn how to use a screwdriver because someone really just wants to hammer things together.

The great thing about $your-favorite-scm is that it transcends language or framework choices and is fungible for early any project, even outside of software. I’m surprised it isn’t part of more professional tools.

Re: You already have a Git server

#154

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?

They are available as refs on the remote to pull though, they just aren't listed so don't end up mirrored either.

They are listed tho. You can very much see them in info/refs.

Re: You already have a Git server

#155
post #38

I tried this and it is never as smooth as described. Why is GitHub popular? its not because people are "dumb" as others think. Its because GitHub "Just Works". You don't need obscure tribal knowledge like seba_dos1 suggests [0] or this comment https://news.ycombinator.com/item?id=45711294 The official Git documentation for example has its own documentation that I failed to get work. (it is vastly different from what…

It is "incompetence," or at the very least, it is unwise.

At the very least, a huge part of the intent of Git's very design was decentralization; though as is the case with many good tools, people don't use them as they are designed.

Going further, simply because "deeply centralized Git" is very popular, does not AT ALL determine that "this is the better way to do things." Please don't frame it as if "popular equals ideal."

Re: You already have a Git server

#156
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.

Re: You already have a Git server

#157

Earlier quoted context omitted.

They are available as refs on the remote to pull though, they just aren't listed so don't end up mirrored either.

They are listed tho. You can very much see them in info/refs.

My bad! I got misled by grandparent - they are in fact mirrored with "git clone --mirror" as well.

Re: You already have a Git server

#158

Earlier quoted context omitted.

> all the experts you know use it in slightly different ways What? Knowing that a git repo is just a folder is nowhere near "expert" level. That's basic knowledge, just like knowing that the commits are nodes of a DAG. Sadly, most git users have no idea how the tool works. It's a strange situation, it'd be like if a majority of drivers didn't know how to change gears.

The majority of drivers DON’T know how to change gears. You are simultaneously saying that something is not expert level knowledge while acknowledging that most people don’t know it. Strange.

> The majority of drivers DON’T know how to change gears.

I'm not sure that's true, unless you only take certain parts of the world into consideration.

Re: You already have a Git server

#159

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…

[deleted]

Re: You already have a Git server

#160

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…

I always thought it would have been better, and less confusing for newcomers, if GitHub had named the default remote “github”, instead of origin, in the examples.

If I clone my fork, I always add the upstream remote straight away. Origin and Upstream could each be github, ambiguous.
Post reply on HN