Git vs Github: understanding their difference

  • Thread starter Thread starter fog37
  • Start date Start date
Click For Summary
SUMMARY

Git is a free, open-source version control system that operates locally on a user's machine through a command line interface. GitHub, created by an independent team and acquired by Microsoft in 2018, is a web-based platform that hosts Git repositories and facilitates collaboration through additional features such as issue tracking and project management tools. While Git is primarily for personal version control, GitHub enhances collaboration by allowing multiple users to share and manage repositories online. Users can utilize Git Desktop for a GUI experience, but understanding the distinction between Git and GitHub is crucial for effective version control and project management.

PREREQUISITES
  • Understanding of version control concepts
  • Familiarity with command line interfaces
  • Basic knowledge of repository management
  • Awareness of collaboration tools in software development
NEXT STEPS
  • Explore Git command line basics for version control
  • Learn about GitHub features such as issue tracking and GitHub Actions
  • Investigate Git Desktop for GUI-based version control
  • Research GitHub Enterprise for private repository management
USEFUL FOR

Software developers, project managers, and anyone involved in collaborative coding projects will benefit from understanding the differences between Git and GitHub, as well as how to leverage both tools effectively.

fog37
Messages
1,566
Reaction score
108
Hello,
I am unsure I fully grasp the difference between Git and Github. This is what I think:

  • Git is a free, open-source application for version control that runs locally on our machine. It is command line based.
  • Github is a free hosting platform "based on Git" that was created by Microsoft. We can create online repositories containing our versions, share the versions and the repositories, collaborate, etc. which is something that we cannot do with Git.
  • Git seems to be more for personal use to keep up with our versions in an organized fashion. I feel like when we are using Github we are essentially using Git on the web. By analogy, we can use Word on our own local computer but can also use Word on the cloud as part of Microsoft 365. Same software but in different settings (Github has also extra features that Git does not have).
  • Github is also more GUI based than regular Git. However, now we can use Git Desktop which essentially works like Git but with a GUI interface...
Thanks!
 
Computer science news on Phys.org
fog37 said:
Hello,
I am unsure I fully grasp the difference between Git and Github. This is what I think:
They are completely different things, it's like contemplating the difference between the French language and the Bibliothèque nationale de France.
fog37 said:
Git is a free, open-source application for version control that runs locally on our machine. It is command line based.
Yes.

fog37 said:
Github is a free hosting platform
Yes.

fog37 said:
"based on Git"
Not really, it is a hosting platform for collaboration on software repositories held in Git but it does a lot of things that have nothing to do with Git (issue tracking, GitHub actions, GitHub pages...)

fog37 said:
that was created by Microsoft.
No, GitHub was created and run by an independent team for 10 years before Microsoft acquired it in 2018.

fog37 said:
We can create online repositories containing our versions, share the versions and the repositories, collaborate, etc.
Yes.

fog37 said:
which is something that we cannot do with Git.
This is a mismatch of concepts: it's like saying you can borrow a book from Bibliothèque nationale de France but you can't borrow a book from the French language.
 
  • Like
Likes   Reactions: jedishrfu and fog37
The way I see it is that git acts like hiring a filing clerk and a filing cabinet to support your project. The clerk can then do a variety of tasks like taking a snapshot of the current state of your task, extracting older states from the cabinet, maintaining different development histories in parallel, and even complicated but non-creative tasks such as generating a new snapshot by merging two others. You might issue instructions to your clerk using the command line or one of several GUIs.

If you and I are collaborating on a project we each have our own file clerk and cabinet (local repository). Usually we'd also maintain a central repository with its own clerk, and have the clerks pull and push parts of the central repository to and from our local ones. It's also possible to add a third (fourth, fifth...) dev as long as they have access to the central repository.

GitHub provides a place to put your central repository. It also adds a lot of tools like issue trackers and project management that aren't part of git but are more or less necessary for any non-trivial project.
 
Last edited:
  • Like
Likes   Reactions: fog37 and pbuk
Also worth noting that GitHub is a company (or a branch of Microsoft these days), a product, and a particularly popular instance of the product. AFAIK you can buy (or licence, I dunno) GitHub-the-product from GitHub-the-company and run your own private GitHub inside your company intranet. Apart from the web address it looks and functions just the same as GitHub-the-public-and-popular-instance we all have access to, but only folks on your corporate intranet can access it.

Usually when people say "I put it on GitHub" they mean the public one. But if you're in a corporate environment talking to colleagues they might mean their own private instance.
 
  • Like
Likes   Reactions: pbuk
Perhaps a bit of history also helps.

There have been many different version control systems: CVS, Subversion (SVN), Mercurial, Git...
There have also been many different collaboration platforms: Sourceforge, BerliOS (my favourite in its time but now defunct), Bitbucket, GitHub, GitLab...

Historically collaboration platforms supported different VCS but GitHub and GitHub have only ever supported Git, and now Bitbucket has dropped Mercurial, Git is pretty much the only game in town.
 
  • Like
Likes   Reactions: Ibix
Jeez, I'm having PTSD flashbacks to Git/GitHub/CVS/Subversion days.

I lost a lot of hair trying to Commit and Merge branches into the main.
 
Ibix said:
AFAIK you can buy (or licence, I dunno) GitHub-the-product from GitHub-the-company and run your own private GitHub inside your company intranet. Apart from the web address it looks and functions just the same as GitHub-the-public-and-popular-instance we all have access to, but only folks on your corporate intranet can access it.
This is called GitHub Enterprise. It is not exactly the same as the code running github.com but it offers essentially the same functionality to end users plus some more features.
 
In prehistoric tymes there were SCCS and RCS systems and before that simple tape repositories of program code that was updated via 80-col cards in a deck with control cards indicating what to delete, where to insert or where to replace.

The tape systems had no notion of version history whereas the SCCS and RCS systems did.

https://en.wikipedia.org/wiki/Source_Code_Control_System

Remnants of these systems are sprinkled throughout the more modern CVS and Subversion systems...
 
Ibix said:
The way I see it is that git acts like hiring a filing clerk and a filing cabinet to support your project. The clerk can then do a variety of tasks like taking a snapshot of the current state of your task, extracting older states from the cabinet, maintaining different development histories in parallel, and even complicated but non-creative tasks such as generating a new snapshot by merging two others. You might issue instructions to your clerk using the command line or one of several GUIs.

If you and I are collaborating on a project we each have our own file clerk and cabinet (local repository). Usually we'd also maintain a central repository with its own clerk, and have the clerks pull and push parts of the central repository to and from our local ones. It's also possible to add a third (fourth, fifth...) dev as long as they have access to the central repository.

GitHub provides a place to put your central repository. It also adds a lot of tools like issue trackers and project management that aren't part of git but are more or less necessary for any non-trivial project.
I guess my confusion started by thinking that I can sign up and work on Github alone (without ever worrying about downloading and using GIT). On Github, create repositories, add files, modify files, etc. on Github..which sound exactly what Git does...that is why I have been thinking that Github is just the web version of Git...incorrectly I guess...

For example, I have create a simple text file directly in Github, tweaked such file, made branches, etc. exactly what I would do in Git...
 
Last edited:

Similar threads

  • · Replies 20 ·
Replies
20
Views
4K
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
3
Views
1K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K