Git
Getting started
In order to support and facilitate the collaborative group effort, each group will have access to a version-controlled repository in git. Links to an external site. If you are not familiar with git, see . Once familiar, you can check out this thorough introduction Links to an external site. and this cheat-sheet Links to an external site.. A brief introduction to git will be given during your first meeting with your project advisor, during which you will all get access to your group's repo.
Once set up, as described further down on this page, the most common command you will be using are likely:
- git pull (when you get stuff that your friends have constructed; Always do this at the beginning of each session to get the latest version of everything)
- git add [files] (adds listed files to a staging area, so they are committed to the repo next time you do git commit)
- git commit -m "message" (commits any changes that have been added to the repo. Don't forget to type in a meaningful commit message.)
- git push (Pushes your repo, which is local, to the git server, so that other's in your group can see your changes)
It is likely that you will run into merge conflicts when several persons work on the same files. Don't panic! See if you can resolve them (Google is your friend), else contact your project advisor or Anders Nilsson.
Course repos
The group repos are available at
https://gitlab.control.lth.se/regler/FRTN40/2020/group-a Links to an external site.
https://gitlab.control.lth.se/regler/FRTN40/2020/group-b Links to an external site.
... Links to an external site.
To clone your repo, type (in the terminal):
git clone git@gitlab.control.lth.se:regler/FRTN40/2020/group-a.git
Before you can clone your repo, you need to create an account at gitlab.control.lth.se Links to an external site.. Use your real name, first_last, and your LUCAT e-mail address when doing so. Once everyone in your group has an account, e-mail your project advisor with your login names. She/he will then set the permissions for the repo to allow you to access it. It will be read/writable only by your group's members and the course staff. When creating your repo, your friendly course staff populates it with a copy of the repo
git@gitlab.control.lth.se:regler/FRTN40/template
containing the required directory structure for the course, and template files for the final report.
Repo structure
To simplify things for both you, your project advisor, and fellow students, we will all be using the same standard folder structure for all projects - the one that came with your git repo. You are welcome to add sub-folders as you please.
doc - Documentation. A fellow student with access to the repository should be able to reproduce all your project results based on the information here.
report - Presentations for the seminars, the corresponding documentation, and the final report. Note: even if you work with an online LaTeX environment, such as Overleaf, you are required to push LaTeX source from which your final report document can be built. (One subfolder is meant to contain the project plan and reports for feedback seminar 2 while the other is for the final report.)
schematics - Wiring diagrams, drawings, etc.
model - Models and simulations on which you base your design, also scripts and investigations for the control design.
src - all source code for the project. Consider the use of subfolders if you use multiple programmings languages in your project. The code should be tidy, readable, and rigorously documented.
test - tests for the source code. If your source code only consists of a single Arduino program it might not be meaningful to do unit testing, but if you have a more complex project we strongly encourage you to have unit and integration testing of your code.
Useful advice
Make sure that it is very easy to understand how to both compile and get the source code to run on your platform, including complete setup and build instructions of dependencies, such as OpenCV. These instructions are preferably written in the README file in the root folder of the project, using markdown Links to an external site.. Include a picture and a short description of your finished project in this file as well).
It is not possible to commit empty folders to git. If you still want to commit an empty folder, a quite common technique to add files called .gitkeep in the empty folders.
Try to keep your git repository clean. As a rule-of-thumb, do not commit files that can be generated from the code in the repository, e.g., compiled binaries. In principle, neither pdf-files which are generated from the TeX-code should be checked in. However, do check in final versions of your reports, presentations and all other documentation - these are the same documents that go into the shared git repo.
To help you to avoid checking in files that are not needed, the .gitignore contains rules for which files that will not be added to git by default. If you explicitly add a specific file, it will be added regardless of the rules in the .gitignore file.
A .gitignore file that works OK for LaTeX and Matlab files is already in place in your repos.
Links to an external site.