Update git basic setup authored by Radek Ošlejšek's avatar Radek Ošlejšek
...@@ -4,15 +4,15 @@ Follow two important rules to prevent conflicts in the source code: ...@@ -4,15 +4,15 @@ Follow two important rules to prevent conflicts in the source code:
* **Never change files that you do not have to change** according to the assignment (or, at least, return the changes before requesting the final merge). * **Never change files that you do not have to change** according to the assignment (or, at least, return the changes before requesting the final merge).
* Always **commit your changes** before pulling a new iteration (i.e., precisely follow the workflow instructions listed below). * Always **commit your changes** before pulling a new iteration (i.e., precisely follow the workflow instructions listed below).
If you have trouble getting the assignment, you can always go to the GitLab project and download the ZIP file. Then just extract it into your directory, and you should have your new iteration ready. If you have trouble getting the assignment, **you can always go to the GitLab project and download the ZIP file**. Then just extract it into your directory, and you should have your new iteration ready.
# 0. Download the initial project to your PC [optional] # 0. Download the initial project to your PC [optional]
In windows, use [git terminal app](https://git-for-windows.github.io/) application. In MS Windows, use [git terminal app](https://git-for-windows.github.io/) application.
```bash ```bash
git clone https://gitlab.fi.muni.cz/pb162/2023-pb162-seminar-project.git git clone https://gitlab.fi.muni.cz/PROJECT_LINK
cd 2023-pb162-seminar-project cd PROJECT_NAME
git pull origin iteration-01 -X theirs git pull origin iteration-01 -X theirs
``` ```
...@@ -36,17 +36,18 @@ git status ...@@ -36,17 +36,18 @@ git status
# 2. Implement the assignment # 2. Implement the assignment
Follow [instructions on GitLab](https://gitlab.fi.muni.cz/pb162/2023-pb162-seminar-project/tree/master) (switch the branch `master` to `iteration-0X`) Follow instructions in `README.md` or in the project's GitLab (don't forget to switch the branch from `main` or `master` to `iteration-0X`)
# 3. Saving changes # 3. Saving changes
You can do it multiple times. Always check that you added/changed the only classes mentioned in the assignment. Changing other classes may produce conflicts when downloading a new iteration! You can do it multiple times. Always check that you added/changed the only classes mentioned in the assignment. Changing other classes may produce conflicts when downloading a new iteration!
```bash ```bash
git add -A && git commit -m "Shortly describe what you have done." git add -A
git commit -m "Shortly describe what you have done."
``` ```
Then you can look at the changes that you have done Then, you can look at the changes that you have done
```bash ```bash
git diff --staged # before commit git diff --staged # before commit
...@@ -55,5 +56,5 @@ git show # after commit ...@@ -55,5 +56,5 @@ git show # after commit
# 4. Submitting your code # 4. Submitting your code
Go to the project directory, create a ZIP file and upload it to the IS according to your teacher's instructions. If you get feedback from your teacher requesting to repair something in your code, then repeat steps 2 and 3. Go to the project directory, create a ZIP file, and upload it to the IS according to your teacher's instructions. If you get feedback from your teacher requesting to repair something in your code, then repeat steps 2 and 3.