Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

most people think git = github


IT support and cybersecurity teams responsible for blocking and enforcing network access restriction to "github.com" ... blocked a user request to install "git" locally citing the former policy. The organization in question does IT services, software development, and maintenance as their main business.


Sometimes I feel like IT and security people compete on how to make the work least possible.

These guys won.


That’s… special.


Yup. I’ve heard several people say that Git is a product from Microsoft…


I wouldn't mind it if those people are from non-tech background.

Now, if it is a growing misconception among cs students or anyone doing software development or operations, that's a cause for concern.


The irony, when you realize that Linus Torvalds created git.


There's an interview with Torvalds where he states that his daughter told him that in the computer lab at her college Linus is more known for Git than Linux

Clip from the interview: https://www.youtube.com/shorts/0wLidyXzFk8


Looks like they’re not developers after all


Nonsense...

Even someone who knows that git isn't GitHub might not be aware that ssh is enough to use git remotely. That's actually the case for me! I'm a HUGE fan of git, I mildly dislike GitHub, and I never knew that ssh was enough to push to a remote repo. Like, how does it even work, I don't need a server? I suspect this is due to my poor understanding of ssh, not my poor understand of git.


> I don't need a server?

You do, an SSH server needs to be running on the remote if you want to ssh into it, using your ssh client - the `ssh` command on your laptop. It's just not a http server is all.

You start that server using the `sshd` [systemd] service. On VPSs it's enabled by default.

Git supports both http and ssh as the "transport method". So, you can use either. Browsers OTOH only support http.


Exactly! Only now the dots connected. Thank you!!

Edit: hey this is really exciting. For a long time one of the reasons I've loved git (not GitHub) is the elegance of being a piece of software which is decentralized and actually works well. But I'd never actually used the decentralized aspect of it, I've always had a local repo and then defaulted to use GitHub, bitbucket or whatever instead, because I always thought I'd need to install some "git daemon" in order to achieve this and I couldn't be bothered. But now, this is so much more powerful. Linus Torvalds best programmer alive, change my mind.


And in general, any daemon that manipulates files can be replaced by ssh (or ftp) access and a local program.

And most things are files.


BTW, a nice example of this general concept is Emacs' TRAMP mode. This is a mode where you can open and manipulate files (and other things) on remote systems simply by typing a remote path in Emacs. Emacs will then simply run ssh/scp to expose or modify the contents of those files, and of course to run any required commands, such as deleting a file.


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 protocols (in addition, ftp and ftps can be used for fetching, but this is inefficient and deprecated; do not use them).

You only need access to the other node repo information. There's no server. You can also use a simple path and store the other repo on drive.


Sort of related, but given that FTP is supported, I wonder how much work it would take to use telnet as a transport.


Doable. It would basically be ssh but without encryption. You'd have to bang out login by hand, but "username\npassword\n" will probably work, might need a sleep inbetween, and of course you'll have to detect successful login too. Oh, and every 0xff byte will have to be escaped with another 0xff

At that point, may as well support raw serial too.

Supporting rlogin on the other hand is probably as simple as GIT_SSH=rlogin


> 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


You can think of the ssh://server/folder as a normal /folder. ssh provides auth and encryption to a remote hosted folder but you can forget about it for the purpose of understanding the nature of git model.


SSH is just a transport to get access to the repo information. The particular implementation does not matter (I think). Its configuration is orthogonal to git.


It's just a transport, and it needs a server.


Did you know that you can use git locally? It works just like that because ssh is a remote shell.

Read https://git-scm.com/docs/git-init#Documentation/git-init.txt...

Anyway it sounds like you have a lot of holes in your git-knowledge and should read some man pages


No, you're wrong. These are holes in my ssh knowledge, and your comment makes me think you have the same holes.



I mean, you do need an ssh server. Basically ssh can run commands on the remote machine. Most commonly the command would be a shell, but it can also be git commands.


Yup! Someone else just pointed it out. Brilliant, thank you!


I always found these sort of categorical denigrations to be off base. If most people do think git = github then that's because they were taught it by somebody. A lot of somebodies for "most people". Likely by the same somebodies who also come to places like this. It has always taken a village to raise a child and that is just as true for an infant as a junior programmer. But instead we live in a sad world of "why didn't schools teach person x"


Despite your indignation, the observation that most people think GitHub is git is entirely true. Do you point it out when you spot someone having that mistaken belief? I do.


What makes you say that people complain about the spread of incorrect knowledge "instead" of teaching? Because there's nothing wrong with doing both.


they were taught by github


Humans are fallible, relying on hearsay is unprofessional, learn your craft properly.

Imagine what the equivalent argumentation for a lawyer or nurse would be. Those rules ought to apply for engineers, too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: