Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Setting up a Git repository

Here we briefly address to important components of every git repository: the gitignore file and the README file.

Making a new repo

Go to https://github.com/new. This will lead to a page where you can create a new repository.

Choose a descriptive Repository name. Choose it wisely as your repositories will be shared with teachers (or future colleagues). In some cases, like this online book, the repository name will be part of the URL.

Choose visibility to private, Add Readme (on) and click on the green button with Create repository.

Now you have a repository where you can share and synchronize materials.

Click on Settings (in the top right corner of your screen) and click on Collaborators in the left-hand menu.

Click the Add people button under the Manage access heading.

Type your partner’s (or partners’) username and click on Add to this repository (where is your partner’s username).

See here how to get your repo locally.

README

A readme file (README.md in the root folder) is an important source of information in your project. It contains an explanation of the content of your project, who worked on the project, how to contact anybody working on the project, how to cite the project in further scientific research and any further information that you find to be relevant.

A good readme file includes at least the information below, but you can always add information as you wish.

Copyright © 2026 [name]. All rights reserved. This source code is provided for educational/review purposes only. Reuse, modification, or redistribution is not permitted without prior permission.

The goal of a readme file is to answer any and all questions that a user might have while looking at your project or while using your project. Sections that can be added when relevant could be an explanation of the data, examples, keywords, most relevant conclusions, etc. An example of a readme file including a lot of information can be found here.

Gitignore

A .gitignore file contains all files or directories that Git ignores while tracking, committing, pushing or pulling files to your repository. There could be several reasons that you would want to include files in a gitignore file, below some examples:

Your .gitignore file can include both folders, specific files, or files ending with a specific extension, like *.pdf.

Below an example for ignoring a folder “data”, a specific file “project.py” and all files ending in “.ipynb”

# Ignore the entire "data" and "_build" folder (and all its contents)
data/
_build

# Ignore the specific file "project.py"
project.py

# pixi environments
.pixi/*
!.pixi/config.toml


# Ignore all Jupyter Notebook files and pdf
*.ipynb
*.pdf

# Ignore secrets 
.env