What is Git & what is GitHub?

Learn the Basics of Version Control

Discover the origins and applications of Git and GitHub, crucial tools for version control and collaboration in coding projects. Understand how these systems track changes, enable collaboration, and how they can be manipulated through command lines and GUI apps.

Key Insights

  • Git, created by Linus Torvalds in 2005, is the most commonly used source code management system. It's used for version control, tracking changes made to code and allowing you to revert back to specific versions if necessary.
  • Git tracks changes such as code addition or deletion at the character level, storing the list of changes in a hidden folder at the root level of your project folder.
  • GitHub, purchased by Microsoft in 2018, is an online platform where Git repositories can be stored, allowing collaboration among developers. Changes made to local repositories can be uploaded (pushed) to GitHub, and changes made by others can be downloaded (pulled).
  • There are alternatives to GitHub, such as Bitbucket by Atlassian, that offer similar services. These platforms also utilize the open-source software, Git, for uploading and downloading changes.
  • Git can be accessed via command line ways or GUI apps like Visual Studio Code, which integrates with both Git on your local machine and GitHub. This allows direct editing and committing to a repository without needing to download any files or install anything.
  • Noble Desktop offers various coding classes, covering topics such as web development, Python, and data science, which can help you master using Git and GitHub in your coding projects.

Git vs GitHub

What it is
Git A version control system that runs on your machine. Tracks file history locally.
GitHub A cloud platform that hosts Git repositories — adds collaboration, PRs, issues.

Play video

View the presentation slides shown in the video.

What is Git?

Git was created by Linus Torvalds in 2005 for the development of Linux, (a clone of the Unix operating system). Linux and Unix are commonly used to run servers, and macOS is based on UNIX. Git is the most commonly used source code management system.

Git is for version control, so it’s called a version control system. It’s free and open-source software that runs locally on your Mac, PC, Linux, or whatever operating system to track the changes that are made to code.

Full-Stack Web Development Certificate: Live & Hands-on, In NYC or Online, 0% Financing, 1-on-1 Mentoring, Free Retake, Job Prep. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

What Does Git Do?

Git tracks the changes you and other developers make to files. Project files and their change history (because Git is all about changes) are stored on your computer as you work on them. With a record of what has been done (which Git tracks for you), you can revert back to specific versions should you ever need to in the future.

So you can see what’s been done and you can revert back to it if you do something bad that you realized later on you should have done. And how would you remember that change? Well, Git is going to remember it for you.

How Does Git Track Changes?

Changes are tracked as things like adding or deleting code, adding or deleting files. Git tracks those changes made to code at the character level. By looking at what has actually changed in the file (rather than file modification dates), the changes you make to one line and the changes someone else makes to another line can be successfully merged, keeping both changes (even within the same file).

The list of changes is stored in a hidden folder at the root level of your project folder.

What is GitHub and How Do We Collaborate with Git?

GitHub is a company that was purchased by Microsoft in 2018. GitHub is a place where you can store an online copy of Git repositories. And those Git repositories contains the files and their revision history (all the changes that have been made to them). Having a centrally located place (specifically online) where you can upload your changes and download changes from others, enables you to collaborate with other developers.

How Does GitHub Work?

Changes you make are stored in your local repository (or repo for short). To share them with other people you upload (or push as Git calls it) your changes to that online repository stored in GitHub. Other people can download (or pull as Git calls it) those changes and Git will apply the changes to their files.

Of course, you can also pull those changes made by others, and have those changes applied to your files. So everybody is uploading (pushing) to GitHub to send their changes to other people. And they are also downloading (pulling) the changes from GitHub, so that they can get the changes that other people make applied to their files. Because Git focuses on the changes, it can upload or download that information (just the change information) very efficiently. It does not need to transfer entire files if they only need to be changed. Of course, if it’s a new file that was created, it will have to download that entire new file. But if it’s only changed, it just downloads the changes and then applies those changes locally. It doesn’t have to re-download the entire file.

Are There Alternatives to GitHub?

Sure. There are other companies that do similar things. GitHub is just one company.

One alternative is Bitbucket that’s made by Atlassian and it’s Atlassian’s version of GitHub. GitHub is owned by Microsoft, so it’s just another company offering a very similar type of service. Because Git is open-source software, any company can make an online hosting platform that allows you to upload (or push as Git calls it) your changes to that online platform using Git.

And you can download (or pull as Git calls it) the changes that other people have uploaded. So whatever this online platform is (whether it is GitHub or Bitbucket or similar type of service) people are using Git as a way to track those changes, upload those changes to share them with other people, and download the changes that other people have uploaded to that shared online repository.

How Do I Use Git? Command Line Vs. Desktop GUI Apps

So how do you actually use Git? Well, there are a couple of ways. There are command line ways or GUI (graphical user interface) apps that you can use. Git is software that you access via the command line or terminal (as it’s called on the Mac). That is how the actual software was developed and is used. But there are desktop apps (including code editors like the very popular Visual Studio Code) that provide a GUI (graphical user interface) to use the features of Git behind the scenes, so that you don’t have to type in the commands into a command line.

Microsoft owns GitHub and also makes Visual Studio Code, so it’s not surprising at all that vs. Code integrates very nicely with both Git on your local machine, and pushing and pulling to GitHub. A very interesting thing that this integration allows with GitHub and Visual Studio Code, is it on any GitHub repository when you’re on GitHub.com, you can simply hit the period (.) key on that repository. Assuming you have the permission to edit and commit to that repository, it will load a web version of Visual Studio Code right there in your browser, and you can start editing and contributing directly, committing to that repository without having to download any files or install anything. It just loads the web version of your code right in the browser. That’s a pretty amazing integration. That’s not the typical workflow that we use all the time (mostly you work with local files pushing and pulling the changes to something like GitHub) but it’s still a very interesting way to use Git and GitHub. So there are multiple ways you can use Git, it just depending on your personal preferences.

Coding Classes & Certificate Programs

We hope this helped to clarify what exactly Git and GitHub are. If you’re currently enrolled in one of our programs, we look forward to seeing you in class. If you’re not enrolled in one of our certificate programs or classes, be sure to check out our coding classes. From web development, Python, to data science and more, we offer various different coding certificate programs. You can learn live online or in-person in New York City.

Video Transcription:

Full Video Transcript

Introduction to Git

Hello, I'm Dan Rodney here for Noble Desktop. I'd like to explain to you exactly what Git and GitHub are. What is Git? Git was created by Linus Torvalds in 2005 for the development of Linux, a clone of the Unix operating system. Linux and Unix are commonly used to run web servers, and macOS is based on Unix.

So Git is the most commonly used source code management system. It's for version control, so it's called a version control system. It's free and open source software that runs locally on your Mac, PC, Linux, or whatever operating system to track the changes that are made to code.

How Git Tracks Changes

So what exactly does it do? Git tracks the changes you and other developers make to files. Project files and their change history, because it's all about changes, are stored on your computer as you work on them with a record of what has been done, which Git tracks for you. You can revert back to specific versions should you ever need to in the future. So you can see what's been done and you can revert back to it if you do something bad that you realize later on you shouldn't have done. And how would you remember that change? Well, Git is going to remember it for you.

How does Git track changes behind the scenes? Changes are tracked as things like adding or deleting code, adding or deleting files. Git tracks those changes made to code at the character level by looking at what has actually changed in the file rather than file modification dates. The changes you make to one line and the changes someone else makes to another line can be successfully merged, keeping both changes even within the same file. The list of changes are stored in a hidden folder at the root level of your project folder.

What is GitHub?

So what is GitHub and how do we collaborate with Git? GitHub is a company that was purchased by Microsoft in 2018. GitHub is a place where you can store an online copy of Git repositories, and those Git repositories contain the files and their revision history—all the things, the changes that have been made to them. Having a centrally located place, specifically online, where you can upload your changes and download changes from others enables you to collaborate with other developers.

Pushing and Pulling with GitHub

So how does GitHub work? Changes you make are stored in your local repository, or repo for short. To share them with other people, you upload—or as Git likes to call it, push. So that's the terminology of Git: you push or upload your changes to that online repository stored in GitHub. Other people can download—or as Git calls it, pull. So you can pull in or download those changes, and Git will apply the changes to their files.

Of course, you can also pull those changes made by others and have those changes applied to your files. So everybody is uploading or pushing to send their changes to other people, and they are also downloading or pulling the changes from GitHub so they can get the changes that other people make applied to their files.

Because Git focuses on the changes, it can upload or download that information—just the change information—very efficiently. It does not need to transfer entire files if they only need to be changed. Of course, if it's a new file that's created, it will have to download that entire new file. But if it's only changed, it just downloads the changes and then applies those changes locally. It doesn't have to re-download the entire file.

Alternatives to GitHub

Are there alternatives to GitHub? Sure, there are other companies that do similar things. GitHub is just one company. An alternative is Bitbucket—that's made by Atlassian, and it's Atlassian's version of GitHub. GitHub is of course owned by Microsoft, so just another company's offering, and it's a very similar type of service.

Because Git is open source software, any company can make an online hosting platform that allows you to upload—or again, as Git likes to call it, push—your changes to that online platform using Git. And you can download or pull, as Git calls it, the changes that other people have uploaded. So whatever this online platform is, whether it is GitHub or Bitbucket or a similar type of service, people are using Git as a way to track those changes, upload those changes to share them with other people, and download the changes that other people have uploaded to that shared online repository.

Ways to Use Git

So how do you actually use Git? Well, there are a couple of ways. There are command line ways or GUI, or graphical user interface, apps that you can use. Git is software that you access via the command line—or Terminal, as it's called on the Mac. That is how the actual software was developed and is used. But there are desktop apps, including code editors like the very popular Visual Studio Code, that provide a GUI or graphical user interface to use the features of Git behind the scenes so that you don't have to type in the commands into a command line.

Microsoft owns GitHub and also makes Visual Studio Code, so it's not surprising at all that VS Code, as we call it for short instead of Visual Studio Code, integrates very nicely with both Git on your local machine and pushing and pulling to GitHub.

GitHub and Visual Studio Code Integration

A very interesting thing that this integration allows with GitHub and Visual Studio Code is that on any GitHub repository, when you're on github.com, you can simply hit the period key on that repository. Assuming you have the permission to edit and commit to that repository, it will load a web version of Visual Studio Code right there in your browser. You can start editing and contributing, directly committing to that repository without having to download any files or install anything. It just loads the web version of VS Code right in the browser.

That's a pretty amazing integration there. It's not the typical workflow that I use all the time—mostly you work with local files, pushing and pulling the changes to something like GitHub—but it's still a very interesting way to use Git and GitHub. So there are multiple ways you can do it, just depending on your personal preferences.

Conclusion

If you're currently enrolled in one of our programs, we look forward to seeing you in class. I hope this has helped to clarify what exactly is Git and GitHub. If you're not enrolled in one of our certificate programs or classes, be sure to check out NobleDesktop.com so that you can learn how to code—whether that is web development, Python, data science. We have various different coding programs you can learn live online or in person in New York City. Thanks again, and I hope this has been helpful.

Topics

Learn more in these courses

How to Learn Git

Master Git with hands-on training. Git is a free, open-source version control system that allows developers to track the changes they make to code.

Yelp Facebook LinkedIn YouTube Twitter Instagram