Skip to content
Snippets Groups Projects
Commit daf5eeb8 authored by Carine Rey's avatar Carine Rey
Browse files

last changes before workshop

parent af53f95e
Branches
No related tags found
No related merge requests found
Pipeline #1585 passed
...@@ -140,9 +140,15 @@ There are several tools available but we will use **Rstudio** (perhaps not the b ...@@ -140,9 +140,15 @@ There are several tools available but we will use **Rstudio** (perhaps not the b
### Install tools ### Install tools
- git : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git - **git** : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- (Windows users: For Windows operating systems, we recommend that you select the Git Bash and Git Gui components in step 3)
<img src="https://gitlab.cirad.fr/cirad/documentation/-/wikis/uploads/dbdc699677639995106fb84b45d07255/git-rstudio-1.png" alt="" width="400"/>
For more details for Windows users: https://gitlab.cirad.fr/cirad/documentation/-/wikis/Installation-de-Git-sur-Windows)
- rstudio : https://posit.co/download/rstudio-desktop/ - **rstudio** : https://posit.co/download/rstudio-desktop/
### Create an account on [ENS's Gitlab].(https://gitbio.ens-lyon.fr/): <https://gitbio.ens-lyon.fr/> ### Create an account on [ENS's Gitlab].(https://gitbio.ens-lyon.fr/): <https://gitbio.ens-lyon.fr/>
...@@ -312,7 +318,7 @@ By default, when creating the Rstudio project, a .gitignore file is added contai ...@@ -312,7 +318,7 @@ By default, when creating the Rstudio project, a .gitignore file is added contai
This means that the Rstudio project configuration files are not tracked. This means that the Rstudio project configuration files are not tracked.
For TP and in general, we don't want to track changes to raw data or results. In general, we don't want to track changes to raw data or results, maybe for small metadata files **but NEVER for big raw data files !!**.
1. Add the following lines to the *.gitignore* file: 1. Add the following lines to the *.gitignore* file:
...@@ -331,6 +337,14 @@ results/ ...@@ -331,6 +337,14 @@ results/
5. View changes on gitlab 5. View changes on gitlab
::: callout-important
# Never commit data into version control repositories
Why you should never commit data to Git:
Data should never be committed into your Git repositories. This is because git was designed to version small files of source code; committing data, a different category of things from source code, into your repositories will first and foremost lead to repository size bloat. Also, committing data into repositories means the data get shipped alongside the source code to anybody who has access to the source code. This might not necessarily be in-line with organizational practices.
:::
## Organizing your working directory ## Organizing your working directory
It's a good idea to put all your project-related files in the same folder: It's a good idea to put all your project-related files in the same folder:
...@@ -390,15 +404,28 @@ At the end of the course, the quality of your README.md will be particularly imp ...@@ -390,15 +404,28 @@ At the end of the course, the quality of your README.md will be particularly imp
4. Index, commit, push ... 4. Index, commit, push ...
::: callout-important
# Never commit data into version control repositories
Why you should never commit data to Git:
Data should never be committed into your Git repositories. This is because git was designed to version small files of source code; committing data, a different category of things from source code, into your repositories will first and foremost lead to repository size bloat. Also, committing data into repositories means the data get shipped alongside the source code to anybody who has access to the source code. This might not necessarily be in-line with organizational practices.
:::
# Time to work on your data # Time to work on your data
Import scripts of your own project on gitlab. Import scripts of your own project on gitlab.
# Resolve conflicts # Resolve conflicts
Some resources to resolve conflicts:
- https://docs.gitlab.com/ee/user/project/merge_requests/conflicts.html
- https://www.simplilearn.com/tutorials/git-tutorial/merge-conflicts-in-git
If you cannot resolve the conflicts : If you cannot resolve the conflicts :
...@@ -412,6 +439,12 @@ If you cannot resolve the conflicts : ...@@ -412,6 +439,12 @@ If you cannot resolve the conflicts :
<img src="figures/git_clone_again.jpg" alt="" width="600"/> <img src="figures/git_clone_again.jpg" alt="" width="600"/>
# Collaboration with multiple people on the same project : the use of multiple branches
See:
- https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
- https://cupofcode.blog/intro-to-git/
------------------------------------------------------------------------ ------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment