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.
- One repository (https://gitlab.fel.cvut.cz/B231_R35PSR/«login»_tasks1-7) is for storing tasks 1–7,
- the other one (https://gitlab.fel.cvut.cz/B231_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:
Create a project for a task in WindRiver Workbench (IDE) workspace
Open the terminal window
Initialize your local git repository for the whole workspace:
cd ~/WindRiver/workspace git init
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
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:B231_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.