Skip to content

Repositories

What is a Repository

A repository in GitHub contains a collection of files associated with a project, including the project's revision history.

Cloning a Repository

Cloning a repository is the process of downloading the repo to your local device so that your local changes can be comitted and merged after passing through the repo's CI/CD tests.

A repo can cloned through HTTPS or SSH. Let's look at an example using this repository, the CHIME FRB GitHub Organization's "guidelines" repo.

Format with HTTPS

git clone https://github.com/CHIMEFRB/guidelines.git

Format with SSH

git clone git@github.com:CHIMEFRB/guidelines.git

Output

Cloning into 'guidelines'...
remote: Enumerating objects: 1685, done.
remote: Counting objects: 100% (231/231), done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 1685 (delta 140), reused 157 (delta 73), pack-reused 1454
Receiving objects: 100% (1685/1685), 15.86 MiB | 11.63 MiB/s, done.
Resolving deltas: 100% (873/873), done.

Creating a Repository

From the CHIME Organization GitHub page you're trying to create a repository on (FRB, SPS, etc), click on the Repositories tab to obtain a list of all of the repositories available from that CHIME team.

From this page, click on "New repository", the green button in the upper left.

Here we can fill out the details of the repository.

Below the repository name is an area to provide a description of the repository. This description will visible from the page listing all of the repositories administered by that CHIME Organization, so that users have an idea of the repository's purpose before clicking on it.

Next is the visibility settings for the repository, which we shall leave set to private. The checkbox to add a README file will automatically add a README.md file to your repository, which is where you can describe your project in detail using Markdown. The .gitignore file tells GitHub which files you do not want to track as you record the changes to your project.

Finally, at the bottom of the list, we are able to select a license that we want to apply to our repository. For this repository, we are going to select the MIT license, which effectively states that anyone can use or modify the software but the author takes no responsibility nor do they provide any support. Other popular open source licenses include Apache 2.0 and GPLv3.