Brief Git Tutorial

Clone Your Repository

  1. Download & Install a Git client: follow this.
  2. Get the git url from your project page (D-INF GitLab). It should have the following format: https://gitlab.inf.ethz.ch/COURSE-NETOS16/<USERNAME>.git or git@gitlab.inf.ethz.ch:COURSE-NETOS16/<USERNAME>.git (for the second URL to work you need to upload an SSH public key first).
  3. Use your git client to move to the directory that you want to use for your project
  4. Type: git clone project_url
  5. More at: Git Basics

Add Content to the Repository

  1. Add or modify files in your project directory
  2. Type git add filename to add new files to the git repo
  3. Commit the changes: git commit -a -m "Commit message"
  4. Push the changes to the remote repo: git push origin master
  5. More at: Git Basics

Update Your Local Copy

  1. Use your git client to move to your project folder
  2. Type git pull origin master