Git is a popular, open source, distributed, version control system. You can find a lot of information about Git (tutorials, list of graphical clients, ...) on GIT homepage.

We created two Git repositories for every student.

  1. One repository (https://gitlab.fel.cvut.cz/B221_R35PSR/«login»_tasks1-7) is for storing tasks 1–7,
  2. the other one (https://gitlab.fel.cvut.cz/B221_R35PSR/«login»_sem) is for semestral work.

The following sections contain additional information about how to work with these repositories.

1   Tracking your tasks code with Git

Here we describe the recommended way to start managing your tasks with Git:

  1. Create a project for a task in WindRiver Workbench (IDE) workspace

  2. Open the terminal window

  3. Initialize your local git repository for the whole workspace:

    cd ~/WindRiver/workspace
    git init
    
  4. Add and commit source code and other files from the project. Do not add generated file like *.o. For example:

    git add task1/*.c
    git commit -m "Initial code of task 1"
    

    or graphically:

    git gui
    
  5. Configure the remote server and push your commits there. You can find repository URL at the corresponding gitlab page. For example:

    git remote add origin git@gitlab.fel.cvut.cz:B221_R35PSR/«login»_tasks1-7.git
    git push --set-upstream origin HEAD
    

After these steps, you can use git push command without other parameters to "upload" your commits to the server.

2   Adding permissions for your team mate

Semestral work should be worked out couples. Both students should work with the same repository. It is up to you to decide which repository will be used but you need to give the other student the permission to access it. Tell the teacher to add a permission for your colleague.