02-0: Clone Github Repositories

Github

  • Github is an online service to store primarily computer programs (small datasets are okay to store).
  • Github repository is like a folder on your computer (but it is online)
    • public: anybody can access it
    • private: only the owner can access it (you cannot even see it on Github)
  • There are numerous public repositories that serve as excellent examples to learn coding
  • You can clone (just another way of saying copy) any public Github repositories to your local computer

Objective

Learn how to clone Github repositories.

Sublime Merge

  • In cloning Github repositories, we will use Sublime Merge.

  • Sublime Merge is certainly not the only option. But, I found it very easy and light-weight to use especially for just cloning Github repositories.

Install Sublime Merge

Click here and install it.

Clone a repository to your computer

  1. Visit the Github repository you want to clone (copy)
  2. Click on the Code button
  3. Click on the a button with two sheets of papers, which will copy the url of the repository

Go to Sublime Merge and follow file -> Clone Repository

You should now see something like below.

  • Note that the source url you copied is already printed on the Source URL box (if not, just paste the url yourself).
  • On Repository Name, the name of the repository for which you copied the url is printed automatically. If you would like a different name, type the name you want.
  • On Destination Path, click on the gray box with ... to select the folder on your machine in which the repository is going to be cloned.
  • Finally, hit the Clone button
  • Let’s clone a repository that has many templates and sample qmd files used in this course.

  • We will actually use this template later, so do not delete it after you clone it.

  • The repository is found here.