Skip to content

Setting up git


All information provided in this page comes from here

Make an account


  • Make an account in using the email you used in the program registration form

Format for the username

Make a username as such: name_surname

For example if my name is…

Andrés López Lee Peters: andres_lopez


Wongsathon Choonhavan: wongsathon_choonhavan

Go local

  • In your terminal, add your Git username and set your email
git config --global "your_username"
  • Configure you email address for uploading
git config --global ""

Generate SSH Keys

  • Check if you have an SSH KEY already (If you see a long string starting with ssh-rsa, you can skip the ssh-keygen step):
cat ~/.ssh/
  • Generate your SSH key:
ssh-keygen -t rsa -C ""
  • Now let´s see your keygen
cat ~/.ssh/
  • Copy your key:


clip < ~/.ssh/


pbcopy < ~/.ssh/


xclip -sel clip < ~/.ssh/

Go global

Add the copied key to by following this guide

Make a repository

There are several ways to have a repository:

  • In the online git platform, create a repository and then clone it
  • In your terminal initialising it from scratch
  • Cloning an existing one (most likely)

Online Git platform

If you are using and online web service for git (Github, Gitlab, bitbucket…), you can create a new project or repo by simply going to one of these below and then follow the instructions to clone it:

Terminal from scratch


  • Navigate to the folder where you want to put or create your repo

  • In the terminal, type:

git init
  • If you have a remote already, you can just do:
git remote add origin
  • And then pull the remote:
git pull

Cloning an existing one

If you have a template or an online repository you want to reuse, you can navigate with your terminal to the desired destination folder and do:

MDEF Students

  • Navigate to the folder where you want to put or create your repo

    cd folder-for-your-project
  • Clone your student repository (ssh)

    git clone
  • Create your own project in Github - Direct access - Make sure that is public!!

  • Tell your local repository to push to the new project in Github:

git remote rename origin old-origin
git remote add origin
  • Do some edits and then add-commit-push (like this for the first commit):
git add FILENAME
git commit -m "My first commit"
git push -u origin --all
  • For further changes, your workflow should be:
git add FILENAME
git commit -m "My other commit"
git push

About the commit message

This is a general point of failure for many many students (and instructors) that do not make a relevant commit message.

Write a meaningful commit message. This should answer the question:

“If I apply this commit, I will… “.

For example:

“uploading final project idea”

This is not OK at all and will not help anyone to trace problems (and they will happen):