Repositories

A repository is the most basic component of GitHub. It’s a place where you can store your code, your files, and each file’s revision history. Repositories can have multiple collaborators and can be either public, internal, or private.

Repository visibility

When you create a repository in the Imperial College London organisation on GitHub, you will have the option to set the repository visibility. This can be either public, internal or private.

Public

Public repositories are visible to anyone on the internet. Anyone can create a fork of the repository (i.e. a copy) and suggest changes to the code base. Usage of GitHub Actions and Packages is free for public repositories (internal and private repositories consume Imperial’s quota). You can also take advantage of Advanced Security which isn’t currently licensed for internal or private repositories.

Public repositories are best used for code you want to share with the world or for non-sensitive projects where it doesn’t matter if everyone can read the contents.

Internal

Internal repositories are visible to anyone who is a member of Imperial. This includes staff, students and third-parties (that have an Imperial email address). All members of Imperial have read access to the repository and can suggest changes.

Internal repositories are best used for code you want to share with the Imperial community. They’re useful for practising inner source within an organisation.

Private

Private repositories are only visible to users who have explicitly been granted read access or higher on the repository.

Private repositories are best used for sensitive projects where only select users should have access.

Repository custom properties

When creating a new repository under the Imperial College London organisation, you’ll be asked to populate some custom fields. These custom fields are currently department and staff-student. It’s important that you populate these fields on your repository so we better understand how people are using GitHub.

If the repository has already been created, you can still populate these custom fields by navigating to your repository > settings > custom properties.

Grouping similar repositories

GitHub uses a flat structure for repositories meaning there is no option to create a folder structure for them (there is an open feature request for it though). This is where GitHub differs to something like GitLab where you have the option to create projects that act as a container for your repositories. To help with organising your repositories, you can use the options below.

  • Create a team and assign that team a role on the relevant repositories. You can then easily view all of the repositories the team has access to under the Teams page.

    Teams page view in GitHub

  • Star the repository and add it to a list. You can then view the list under your starred repositories.

  • Consider using a naming convention for similar repositories. This could help when searching for them. For example, if you had a project called my-project, you might prefix all the related repos with myproject.

Further reading


Page last modified: 29 Jul 2024.