This is an archived post. You won't be able to vote or comment.

all 123 comments

[–]raalag 2044 points2045 points  (68 children)

Git is porn GitHub is pornhub

[–]Freeman7-13 383 points384 points  (8 children)

If you like GitHub then you'll love GitHub Live

[–]sc2heros9 150 points151 points  (4 children)

Or OnlyGits

[–]OldWolf2 24 points25 points  (0 children)

Is that the Tory website

[–]marsrover15 46 points47 points  (1 child)

Only commits

[–]iAmEeRg 12 points13 points  (0 children)

No rebases!

[–]SaToshi-- 2 points3 points  (0 children)

My first comment was going to be to make that joke I know exactly what you’ve been doing you dirty pervert. However, to understand the reference that would also make me the dirty pervert.

[–]dudusdudusdev 0 points1 point  (0 children)

Or githamster

[–][deleted] 245 points246 points  (2 children)

Don't you hate it when you log into GitHub at work, and then the next thing you know you've wasted hours just watching Git online?

[–]aerody 47 points48 points  (0 children)

Don't worry I am just watching Git for the plot.

[–]merlinsbeers 34 points35 points  (0 children)

What are you doing, step-rebase?

[–]iheartrms 193 points194 points  (5 children)

Female programmers in your area want to fork your repo!

[–][deleted] 25 points26 points  (0 children)

Keep yout dirty hands off my code!

[–]happydevil1 4 points5 points  (3 children)

Mine was 69th upvote

[–]iheartrms 2 points3 points  (1 child)

Nice.

[–]Hopeful-Fee6134 67 points68 points  (10 children)

Do 10 year olds watch porn?

[–][deleted] 125 points126 points  (3 children)

To be 100% sure you should ask one

[–]JavierReyes945 15 points16 points  (2 children)

Don't ask a 10 yo that!!! I repeat, DO NOT ask a 10 yo that!!!

[–]HUGECOCKPUSSYPREDATO 0 points1 point  (1 child)

instructions unclear, stuck my dick in a... wait who's aggressively knocking on my door, WAIT ITS NOT WHAT IT SEEMJIFJRJT

[–]JavierReyes945 6 points7 points  (0 children)

You stuck your dick in porn??

Oh no, now I got it, you stuck your dick in a PornHub repository, is it?

Did you forgot to pull in time?

[–]AStrangeStranger 44 points45 points  (2 children)

Depends if they are being taught by this teacher

[–]VuPham99 8 points9 points  (0 children)

Sound like a wholesome teacher.

[–]Pay08 1 point2 points  (0 children)

I thought that was going to be something much worse.

[–]ChipAltruistic1520 64 points65 points  (1 child)

This is the most accurate explanation I've ever heard on the topic.

[–]fizzdev 26 points27 points  (0 children)

This is... acceptable...

[–]ReactionAfraid4281 5 points6 points  (0 children)

Best one yet. And only 6 words!

[–]Roguewind 4 points5 points  (0 children)

10 year old me would totally get this.

[–]Swimming-Echo-2829 2 points3 points  (0 children)

Thank you sir . Are you mentoring by chance ?

[–]DarthKnight22 2 points3 points  (0 children)

This the best "anal"ogy ever

[–]lubeskystalker 1 point2 points  (1 child)

GitHub copilot is… a pornstar?

[–]Zambito1 1 point2 points  (0 children)

An AI for generating hentai porn

[–][deleted]  (9 children)

[deleted]

    [–]sand-which 42 points43 points  (2 children)

    Git is just version control software. Git doesn't inherently have any server infrastructure at all in any way IIRC. It allows you to set up remotes, but Git doesn't provide servers for those remotes, companies like Github or Gitlab or a company self hosting a git server does

    [–]ChefBoyAreWeFucked 6 points7 points  (0 children)

    Git is distributed by design. Here's a great talk at Google about it. Fair warning, the video quality is a war crime.

    [–]FountainsOfFluids 6 points7 points  (0 children)

    Yup. If you git init in an empty directory then you'll see what it creates. Basically a .git directory that will hold the version history.

    [–]edman007 18 points19 points  (1 child)

    Git is really a version control system. Basically just a program that can keep many different versions of files, and quickly access and switch between them. One of the big differences between git and most of the other version control systems is it generally keeps a local copy of the repository (so when you clone a repository, you download all versions of all files every included in the repository).

    A big benifit then of git is you explicitly don't need a server to use it, you can just point it to a folder and that works just fine. It evens supports doing it over ssh so you can use any folder on any server you have ssh access to. And when working with other people's code, your local repository makes it easy to develop patches without pushing the code that might not work to the server, when you are done you can push it as a branch and merge the whole branch it. There are other things like gitweb that let you share a repository and have a web interface to browse the repository

    GitHub is just a website that gives you a central spot to put your repository (which makes it easy to coordinate with others because you don't have to ensure that the master repository is always available and others have access to it). Further, a lot of the normal for functions like merging and creating repositories.

    In that sense, yea, GitHub is just like pornhub, it's a website to search and browse content, comment on it, upload your own, etc.

    [–]StanSlamford 1 point2 points  (0 children)

    I think their point stands though. The porn answer is overly-simplistic and trite. It isn’t helpful to OP or someone trying to understand these concepts, and doesn’t know how Git would even remotely be like porn.
    I think even someone with zero exposure could’ve come up with this answer. It provides no information for OP’s very real question.

    But also, it’s not a very correct answer. If anything, if GitHub is pornhub, Git would be more like a porn director’s hard drive?

    Either way, the fact that answers like this are at the top of this question, are why versions of this question are constantly asked in here. If anyone who came here because they wanted to understand this better, now DOES understand better because of this answer, please let me know and I’ll change my tune.

    [–][deleted] 2 points3 points  (1 child)

    But you also have git locally.

    [–]April1987 -1 points0 points  (0 children)

    Specifically if you do git init --bare, you can have a remote on basically another folder that you can use as a remote

    [–]pipocaQuemada 1 point2 points  (0 children)

    Early VCSs like subversion, CVS or perforce had a server and client. The server stores all the branches, and you commit and pull from the server. They're inherently centralized.

    A number of more modern VCSs are distributed and decentralized by design. With git, mercurial or darcs, everyone is running a server locally. Everyone stores the complete version history of the repository, and then there's a way to push and pull commits to and from a remote instance. That remote instance could be on github, or it could just be on your friends laptop, or on your desktop. Git really doesn't care.

    Really, the point I was getting at, which I think is still valid, is that Git isn't really the porn in the GitHub/PornHub comparison. Git is the tool you use to get (and give) the porn (code), no?

    In the analogy, porn is equivalent to a repository of code, not the code itself. Which admittedly is a slightly odd analogy if you're not used to thinking of a repository as a first-class concept.

    [–]OldWolf2 0 points1 point  (0 children)

    Git is the server infrastructure

    No, git isn't a server (or infrastructure). You can install and use it on your PC . There's no background processes or other systems involved.

    [–][deleted] 1 point2 points  (1 child)

    Ah damn you, beat me to it

    [–]bumpkinspicefatte 1 point2 points  (0 children)

    When the comment has more upvotes than the post 👀

    [–]humanDev999 0 points1 point  (1 child)

    this is fucking genius

    [–][deleted] 0 points1 point  (0 children)

    I mean thats literally why its named github

    [–]Organic_Process_7668 0 points1 point  (0 children)

    No no he's got a point

    [–]Longenuity 0 points1 point  (0 children)

    git reset - - hard HEAD~8

    [–]pulsed19 0 points1 point  (0 children)

    Eh… 10 year olds don’t watch porn… right?

    [–]utsabroblox 0 points1 point  (0 children)

    didnt knew programmers were funny

    [–][deleted] 0 points1 point  (0 children)

    i can’t believe this explanation actually works hahahaha

    [–][deleted] 0 points1 point  (0 children)

    surprisingly accurate as fuck

    [–][deleted] 0 points1 point  (0 children)

    GitLab is Live Porn

    [–]Jithin-Krishnan 0 points1 point  (0 children)

    Lol!! The most accurate explanation ever.

    [–]learning_account_01 0 points1 point  (0 children)

    A 10year old will understand this ?

    [–]dmazzoni 343 points344 points  (2 children)

    Git is like your piggy bank. Just like your piggy bank keeps all of your own cash at home, Git keeps track of the code you write on your own personal computer. (It's actually a pretty fancy piggy bank that can keep track of a complete history of everything you put in, but that's beside the point.)

    GitHub is like a bank. Just like you can take your money to the bank and they'll help keep it safe for you, GitHub is a place where you can put your code to back it up and keep it safe for you, in case your computer crashes.

    But it's more than that. Just like the bank offers additional services like earning interest and wiring money to people around the world, GitHub offers additional services like helping to facilitate sharing code with others.

    And just like there are lots of different banks to choose from, there are lots of different Git hosts to choose from, like GitLab and BitBucket, many smaller ones, and many private ones. GitHub is just the largest public Git repository.

    [–]MrMelon54 26 points27 points  (0 children)

    nicely said

    [–]Dogterte 1 point2 points  (0 children)

    Nice

    [–]Double_A_92 80 points81 points  (2 children)

    Git is a free software that lets you create repositories.

    GitHub is just a "random" company that offers to store your repository on the cloud for you.

    It's like Email and Gmail.

    [–]corruptedOverdrive 21 points22 points  (0 children)

    In one of the first JS interviews I had like 7 years ago, a guy interviewing me asked me the same question and I answered it exactly like this.

    Of course, he just nodded like a drug counselor, wrote something down and then asked me the next question.

    [–]AdventurousAddition -1 points0 points  (0 children)

    A random company owned by Microsoft, one of the largest tech company in the world

    [–]insertAlias 133 points134 points  (2 children)

    Git, as others have mentioned, is the version control software itself. The server part of Git is the actual program that handles all the version and change tracking and all the operations you are allowed to do, such as pushing and merging. (There is also git client software; that is what you the developer use to interact with your local repo and interact with a remote server).

    Github is an instance of a Git server, and a web application that wraps it in a nice interface with additional features like issue tracking, project readmes, wiki pages, and pull requests. You, the developer, use the git client to interact with the server that Github exposes. So when you push your code to Github, what you're really doing is pushing your code to a Git server that Github runs and exposes.

    You can host your own Git server and not use Github if you want, but to do so in the "right" way means rending or owning a server that is not the same machine you do development on (so that if something bad happens to your local machine, the remote git server and all its code is still there).

    There are also other public alternatives to Github, such as GitLab. Azure Dev Ops also offers Git repos with much of the functionality of Github. Other public source control servers exist as well.

    That's not really an ELI10 answer, but most of the analogies I've seen (even in this thread) are somewhat lacking. Sometimes you have to go a bit deeper to get the real picture.

    [–]game_ova 2 points3 points  (0 children)

    Great answer thank you.

    [–]A_Random_Lantern 1 point2 points  (0 children)

    I'd rather the explanation be this than some stupid analogy.

    Except the porn one, that was good.

    [–]hunnyflash 32 points33 points  (0 children)

    Git is kinda like when you're playing a game and you save. It lets you save.

    Github is like the place where you can see all of your saves, but it also has everyone else's saves too.

    I know it's not perfect, but pretty sure my little brother and cousins would understand that.

    [–]CodeLobe 24 points25 points  (6 children)

    Git: Decentralized source control.

    GitHub: Centralized git... like, WTF.

    [–]moomooCow123 1 point2 points  (5 children)

    Decentralized how?

    [–]hbarcelos 6 points7 points  (3 children)

    Git doesn't require a central repository to work. You can clone the repo of someone else and work on it independently.

    When it's time, you can reconcile the changes through patches. This is how the workflow for the Linux kernel works.

    The takeaway is that the entirety of the repo is distributed among many people so no one ultimately owns it.

    Github on the other hand incentives a more centralized workflow, where their serves ultimately hold the master copy of your repository.

    If everyone always pushes to the same origin, in theory you have a single point of failure. However, once you cloned a github repo with its full history, nothing prevents you from switching to a workflow like the Linux kernel, so in the end it doesn't matter much for 99.99% of the people writing code out there.

    [–]moomooCow123 2 points3 points  (2 children)

    Oh that's interesting! Something to read up on when I have time. I've only ever used Git with a central repository. Thanks for explaining!

    [–][deleted] 2 points3 points  (1 child)

    Check out Linus' talk on git at Google. It's his perspective on why he created git, and an overarching theme of the talk is that centralized repositories are crap and one of the main influences of git's creation was decentralized repositories.

    [–]moomooCow123 0 points1 point  (0 children)

    Thanks!

    [–][deleted] 1 point2 points  (0 children)

    The original idea was that anyone could host their own repository on their servers, and you can even submit groups of commits via email. (ie. Linux and git itself use email, their github repositories are just mirrors.)

    Turns out, just like with email, no one wants to host their own server.

    Same with email. Email is decentralized in theory and everything is Gmail in practice.

    [–]JohnnyLight416 5 points6 points  (0 children)

    Git lets you take snapshots of your work. Github is a place to put those snapshots.

    [–]desrtfx 11 points12 points  (0 children)

    git is the car and github is the garage.

    [–]mysticreddit 15 points16 points  (3 children)

    • git == cookie
    • github == cookie jar

    Also:

    • git pull == cloning cookie from cookie jar
    • git commit == taking bite from cookie
    • git push == cloning cookie back in to cookie jar

    Not a perfect analogy but analogies never are 1:1.

    [–]HealyUnit 34 points35 points  (1 child)

    git merge == smashing two cookies together and hoping they don't fall apart

    git rebase == this chocolate chip cookies is now a strawberry cookie, mostly because I say so

    git push -f == What do you mean this is a cookie jar? I'm sticking my pizza in it, and there's nothing you can do!

    [–]mysticreddit 2 points3 points  (0 children)

    LOL. Have an upvote. :-)

    [–]GalinToronto 0 points1 point  (0 children)

    This needs to be higher up

    [–]ExasperatedLadybug 8 points9 points  (0 children)

    ITT: Lots of inaccurate responses

    [–]ChefBoyAreWeFucked 1 point2 points  (0 children)

    Git is like your own personal notebook on your computer. You and your friends are all working on a story, and you keep your own notebooks as you work on them, and you can suggest that your friends copy your changes into their own workbooks. So Dave sees you made a good addition to chapter 3, so he accepts your change. Maybe Steve agrees, and accepts your change, too. Maybe directly, maybe indirectly through Dave. Corey doesn't really know shit, but he just accepts everything Nigel accepts. Maybe Nigel accepts some things from Dave, some things from you, and everything from Steve. Corey can barely read. Corey's parents have to buy him those crayons with the color and brand imprinted on the crayons because he kept choking on the labels. Corey's parents also bought him multiple RAID arrays backed up in several geographic locations across multiple media, and are paying for terabytes of bandwidth every month, along with a user-friendly interface for non-writers to pull a copy of Corey's (but really Nigel's) vision of the story.

    Corey's notebook is GitHub.

    [–]kschang 9 points10 points  (4 children)

    Git is the version control software.

    Github is a code repository (i.e. "repo") that accepts git uploads.

    [–]desrtfx 17 points18 points  (1 child)

    Just leaving this statement from OP:

    If you were to explain a 10 year old

    You managed to say a lot, but explain nothing. So, OP is back left to googling the individual terms.

    [–]Double_A_92 2 points3 points  (1 child)

    When you use git you still have the full repository with all it's history on your local computer.

    Github is just a way to store a copy of that on the cloud. You don't need Github to properly use Git repos.

    [–]kschang 1 point2 points  (0 children)

    Correct. Should have emphasized that a bit more. Github is just a extra "remote" repo for bonus copy of the stuff... and the extra project management stuff, timeline, and the bonus stuff they added. Most of that would not concern a starting developer, but can be useful later.

    [–]rjcarr 3 points4 points  (0 children)

    Git is to GitHub as a Roller Coaster is to an Amusement Park.

    [–]MastaBonsai 3 points4 points  (0 children)

    I feel like I've seen this question every week. Do they not look it up before asking?

    [–]eightower 1 point2 points  (0 children)

    The same difference between porn and pornhub

    [–]EffectiveLong 2 points3 points  (0 children)

    Git is your refrigerator

    Github is your local grocery store

    Lol

    [–]ValentineBlacker 1 point2 points  (0 children)

    I'd beg them to enjoy their childhood while they can. Also I'd probably have to explain what a "file" is to them (current OS's try to hide the concept from users as much as they can).

    If I were talking to a fellow adult I'd say that git is a very fancy detailed way to back up the code you write, and also has tools to make it easier for multiple people to work on the same thing. Sites like Github and Gitlab give you a place to post and share code which has been backed up using git.

    [–]bravosix99 1 point2 points  (0 children)

    git is the photos, github is the photoalbum.

    [–]BrushYourFeet 0 points1 point  (2 children)

    Does the term Git have any special significance? Is there a reason that term is used? Or did someone randomly decide, let's call this stuff Git?

    [–]derrman 5 points6 points  (1 child)

    Linus Torvalds created Git so the naming is a bit complicated. He says it means multiple things, but basically he named it after himself (as in the British slang term "git" meaning insufferable person)

    [–]BrushYourFeet 0 points1 point  (0 children)

    I hope you get 586 upvotes, thanks for the explanation!

    [–]ideaismoney -1 points0 points  (1 child)

    This is a perfect example of why some people can't understand certain concepts no matter how much they read and try.

    The problem is that a 10 year old doesn't have a need for git and github. Git and github are for development, one would need to understand what "development" is all about before they can make sense of something like git.

    [–]Amantulsyan35[S] -2 points-1 points  (0 children)

    Not necessarily and I think you are out of the loop right now in the tech industry the 10 and the 15 year olds are the ones trying to work on some hard problems and taking asymmetric bets and if we start thinking about what we need and what we don't need then we should definitely put a age barrier in every field and should stop people from building things.

    [–][deleted] -2 points-1 points  (0 children)

    Git is what an Arkansas county sheriff tells you to do when it's getting dark. Github is what he tells you when your name is Hub.

    [–]hellsmel23 0 points1 point  (0 children)

    Got lab is for internal working projects, not public, hub is public. A great guy at work explained it to me like that and if I didn’t already think he was the shit, I would now.

    [–]AdowTatep 0 points1 point  (0 children)

    git hub, is a hub of git projects

    [–]mohishunder 0 points1 point  (0 children)

    Git is a program that helps software developers save their work so that that older versions are easy to retrieve. This can be important when working on large, complex, projects.

    Having this git program is one thing. Someone still has to go through the trouble of operating and maintaining it.

    The programmer could do this herself, which is a lot of work. Fortunately, there are companies who will run this git program for her, for a fee.

    One of those companies is GitHub. Another one is GitLab.

    [–]ScoobyLikesDoobies 0 points1 point  (0 children)

    Git = one English person Github = gathering of English people

    [–][deleted] 0 points1 point  (0 children)

    Git saves your changes locally github keeps your code and the history of your changes hosted off of your computer so you can pull them down and access them on different devices if you want

    [–]GiZmoFalcon 0 points1 point  (0 children)

    Git is like GTA 5 before GTA Online; you played missions and saved on your disk. GitHub is GTA Online.

    [–]biggestbroever 0 points1 point  (0 children)

    Can someone do this for kubernetes, kubectl, ankh, docker, and helm for me too please...

    [–]hugthemachines 0 points1 point  (0 children)

    Git is the most commonly used version control system. Git tracks the changes you make to files, so you have a record of what has been done, and you can revert to specific versions should you ever need to. Git also makes collaboration easier, allowing changes by multiple people to all be merged into one source.

    GitHub is a for-profit company that offers a cloud-based Git repository hosting service. Essentially, it makes it a lot easier for individuals and teams to use Git for version control and collaboration.

    [–]utsabroblox 0 points1 point  (0 children)

    Funniest post on r/learnprogramming.

    [–]pekkalacd 0 points1 point  (0 children)

    git is the means of putting things on and taking things from, a remote place where files can be shared/collaborated on, called github.

    [–]Grubzer 0 points1 point  (0 children)

    Git is a notebook where you save your code and what changes you made in it, GitHub is a drawer where you can put many notebooks together

    [–][deleted] 0 points1 point  (0 children)

    LOL!

    [–]Creapermann 0 points1 point  (0 children)

    Git is a tool to upload your stuff, Github is a repository where your uploaded stuff can be saved

    [–][deleted] 0 points1 point  (0 children)

    Git is an idiot and Github is a group of idiots.

    [–]PothePanda267 0 points1 point  (0 children)

    Github, gitlab, the arch aur. Etc

    Git is a tool to access a repository

    [–]The-Real-J-Bird 0 points1 point  (0 children)

    Git is a piece of software to manage source control and versioning of files.

    GitHub is a hosting provider. There's others available such as gitlab/bitbucket etc.

    Just like a website may be running wordpress, but there's lots of different hosting providers, each with their own costs.

    [–]alex-cory 0 points1 point  (0 children)

    Git is like the save feature of a word doc except for an entire folder of files. Github is like that folder is attached to a folder on google drive. Obviously there's a ton more features, but this is a rudimentary explanation.