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 a Git repository for every student to work on the semestral assignment under https://gitlab.fel.cvut.cz/B241_R35PSR/. The following sections contain additional information about how to work with the repository.

1   Tracking your tasks code with Git

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

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

  2. Open the terminal window.

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

    cd ~/WindRiver/workspace # or anywhere else you stored the semestral task
    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 *.c
    git commit -m "Initial commit"
    

    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:B241_R35PSR/«login»_sem.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 submitted in pairs. 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.