GitHub

June 13, 2020

What is GitHub ? 🤔

GitHub is a code-hosting platform. It lets you and others work together on projects from anywhere.

👉 Before anything else, if you haven’t done it yet, you should go now to github.com and create an account.

👉 GitHub is NOT Git. Git is a version control software that sets repositories. GitHub repository hosting platform that understands Git. Git runs on your local machine, whereas GitHub runs on the Internet. Keep in mind some people consider GitHub as a Social Network to share code.

Clone a GitHub repository

To clone a GitHub repository is to copy the entire project to your local computer. Basically, it is a combination of:

👉 git init (create the local repository)

👉 git remote add (add the URL to that repository)

👉 git fetch (fetch all branches from that URL to your local repository)

👉 git checkout (create all the files of the main branch in your working tree)

For now, forget about the fetching and the checkout. We will learn about branches in another lesson.

But you should know that git clone already initializes your local repository and adds the URL of the remote repository so the system knows where to put the changes and from where get the changes while you work.

$ git clone 

Up next