Thank the renowned software developer Linus Torvalds for Git, the program that powers GitHub. Also thank him for the Linux operating system while you're at it. Git is version control software, so it handles changes to a project without overwriting any existing files. And it's unlikely to go very soon, given that Torvalds and his colleagues Linux kernel developers use Git to construct the core kernel.
Why use a system like Git? Imagine that you and a colleague are changing pages on the same website. You make modifications, save them, and then reupload them to the website. Thus far, so excellent The issue arises when you and a coworker are simultaneously working on the same page. The work of one of you is about to be rewritten and erased.
Git, a version control application, prevents this from occurring. Git allows you and your coworker to upload revisions to the same page and saves two copies. You can later integrate your adjustments without losing any work in the process. Git maintains a "snapshot" of every modification ever made, allowing you to roll back to a previous version at any time.
The issue with Git is that it is so antiquated that we must use the command line — or Terminal if you're a Mac user — to access it, just like hackers from the 1990s. This can be a challenging proposition for computer users of today. Thus, GitHub comes into play.
In this tutorial, there are a few words I’m going to use repeatedly, none of which I’d heard before I started learning. Here’s the big ones:
Command Line: The computer program we use to input Git commands. On a Mac, it’s called Terminal. On a PC, it’s a non-native program that you download when you download Git for the first time . In both cases, you type text-based commands, known as prompts, into the screen, instead of using a mouse.
Repository: A directory or storage space where your projects can live. Sometimes GitHub users shorten this to “repo.” It can be local to a folder on your computer, or it can be a storage space on GitHub or another online host. You can keep code files, text files, image files, you name it, inside a repository.
Version Control: Basically, the purpose Git was designed to serve. When you have a Microsoft Word file, you either overwrite every saved file with a new save, or you save multiple versions. With Git, you don’t have to. It keeps “snapshots” of every point in time in the project’s history, so you can never lose or overwrite it.
Commit: This is the command that gives Git its power. When you commit, you are taking a “snapshot” of your repository at that point in time, giving you a checkpoint to which you can reevaluate or restore your project to any previous state.
Branch: How do multiple people work on a project at the same time without Git getting them confused? Usually, they “branch off” of the main project with their own versions full of changes they themselves have made. After they’re done, it’s time to “merge” that branch back with the “master,” the main directory of the project.