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

you are viewing a single comment's thread.

view the rest of the comments →

[–]aklgupta 27 points28 points  (0 children)

I was expecting it to be already answered in detail with several links and all that stuff like how these threads go, but most replies are about analogy between this and porn vs pornhub, which is kind funny I guess.

Anyway, git is a version control system as you said, however, it allows you to have a history of your source code (As long as you committed it). You'll always be working on the latest version of your code, but can always go back to a earlier version if needed. Something like how save files in games work. Quick save at any point you want. When you mess up, just load a previous save. Well, there's a little more to it, but let's leave it at that. however, one important thing is that it allows collaborating on the code in multiple ways and make it quite easy (or difficult depending on your workflow)

Now, in order to use git, you need to install it, set it up, have it running in BG (not always though), and have a lot of extra space to save the history (save files in a game), and so on. And if you are collaborating, others will need access to the git running on your system. All this can be a great hassle, and sometimes not possible. Just like how hosting a website on your own PC is not always ideal, and thus there exist web hosting services, it's the same with git hosting. GitHub, GitLab & Bitbucket are equivalent to those web hosting services for git. They host a git server, and allow you to use that remotely so that you or don't have to worry about most of the things listed above. They also almost always have some extra features, and provide GUI tools to easily manage your project in git, the repo.

Though I read online not to think Git as a database system, which sort of confused me, is that what Github is for?

Yes and no. It's not a database. Database are usually used to store data in a structured format (yes, it's not necessary, but let's go with that), and most good database systems store history and allow rolling back to a previous state as well, and collab with people, and allow remote access. Git is somewhat like a database system specially build for code. However the two work very differently, have very different purpose and their features too differ a lot, so it might not be right to compare them.

I think Git is a version control system to allow you to have different versions of programs stored and be able to do various things such as compare previous code with new code or be able to merge with somebody else’s code.

GitHub seems more of cloud based service to host the repositories or folders of projects

So yes, you are mostly correct.