diff --git a/module2/ressources/rstudio.org b/module2/ressources/rstudio.org index d0b687cd76603489b228a2a53ca2d6c9e355e8ad..85abe560ba2d909e4a24e2514a1ad02a529387e4 100644 --- a/module2/ressources/rstudio.org +++ b/module2/ressources/rstudio.org @@ -95,3 +95,62 @@ install knitr and ggplot2: install.packages("knitr") install.packages("ggplot2") #+END_SRC +* Using Git from Rstudio +** Cloning a repository +Open RStudio and do the following steps: +- Create a new version controled project: =File / New Project / Version + Control= + #+BEGIN_CENTER + file:rstudio_images/new_project.png + + file:rstudio_images/git.png + #+END_CENTER +- Get the url from your gitlab repository: + #+BEGIN_CENTER + file:rstudio_images/adresse_depot.png + #+END_CENTER +- Indicate this URL in the "Repository URL" field (/you may want to + prefix this URL with =xxx@= where =xxx= is/ /your Gitlab id to avoid + repeatedly giving it later on/). + #+BEGIN_CENTER + file:rstudio_images/clone.png + #+END_CENTER +- If you're behind a proxy, git should be configured + accordingly. Check the [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/7508aece244548349424dfd61ee3ba85]["Dealing with proxies" section]]. +- Git will then connect to Gitlab and fetch a whole copy of the + repository. +- RStudio should restart in a mode related to Git: + #+BEGIN_CENTER + file:rstudio_images/rstudio.png + #+END_CENTER +- The file manager on the right, allows you to browse the version + controled repository. +** Modifying a file +- Open =Module2/exo1/toy_document.Rmd= and perform a simple + modification. +- Save +- Go to the Git menu to commit + #+BEGIN_CENTER + file:rstudio_images/commit.png + + file:rstudio_images/commit2.png + #+END_CENTER +- Select the lines to commit and then click on =commit= + #+BEGIN_CENTER + file:rstudio_images/commit5.png + #+END_CENTER + Your modifications have now been commited on your local + machine. They haven't been propagated to GitLab yet. +- Click on =push= to propagate them on GitLab + #+BEGIN_CENTER + file:rstudio_images/push.png + + file:rstudio_images/push2.png + + file:rstudio_images/push3.png + #+END_CENTER + *NB*: You won't be able to propagate your modifications on GitLab if + some modifications have been done on GitLab in the meantime. + file:rstudio_images/push4.png +- You should first merge these remote modifications locally. Click on + =pull= to get these modifications on your machine. diff --git a/module2/ressources/rstudio_images/adresse_depot.png b/module2/ressources/rstudio_images/adresse_depot.png new file mode 100644 index 0000000000000000000000000000000000000000..684b44f96d93fa06e11b78c5d76463ff8a655c2d Binary files /dev/null and b/module2/ressources/rstudio_images/adresse_depot.png differ diff --git a/module2/ressources/rstudio_images/clone.png b/module2/ressources/rstudio_images/clone.png new file mode 100644 index 0000000000000000000000000000000000000000..15e114e2d61116e094d51560efaf467574072b1c Binary files /dev/null and b/module2/ressources/rstudio_images/clone.png differ diff --git a/module2/ressources/rstudio_images/commit.png b/module2/ressources/rstudio_images/commit.png new file mode 100644 index 0000000000000000000000000000000000000000..28734012e7d203634959cdd038779dd44c6c0097 Binary files /dev/null and b/module2/ressources/rstudio_images/commit.png differ diff --git a/module2/ressources/rstudio_images/commit2.png b/module2/ressources/rstudio_images/commit2.png new file mode 100644 index 0000000000000000000000000000000000000000..0c26431fe55b199e5bbf869c24d43f8a5323ec8e Binary files /dev/null and b/module2/ressources/rstudio_images/commit2.png differ diff --git a/module2/ressources/rstudio_images/commit5.png b/module2/ressources/rstudio_images/commit5.png new file mode 100644 index 0000000000000000000000000000000000000000..514ec36856d919fe20f2762cd5783c5b0c490b06 Binary files /dev/null and b/module2/ressources/rstudio_images/commit5.png differ diff --git a/module2/ressources/rstudio_images/git.png b/module2/ressources/rstudio_images/git.png new file mode 100644 index 0000000000000000000000000000000000000000..290631cae3df2c22786cda60a1a9fa8b95598189 Binary files /dev/null and b/module2/ressources/rstudio_images/git.png differ diff --git a/module2/ressources/rstudio_images/new_project.png b/module2/ressources/rstudio_images/new_project.png new file mode 100644 index 0000000000000000000000000000000000000000..27a245e7fd062e666317f5e9172b6db7b4e85782 Binary files /dev/null and b/module2/ressources/rstudio_images/new_project.png differ diff --git a/module2/ressources/rstudio_images/push.png b/module2/ressources/rstudio_images/push.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4b0190156fc9e342656f4b25a47d099dc3a288 Binary files /dev/null and b/module2/ressources/rstudio_images/push.png differ diff --git a/module2/ressources/rstudio_images/push2.png b/module2/ressources/rstudio_images/push2.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0352d7e3ac45c3fdf92f770e69f8a2865a7915 Binary files /dev/null and b/module2/ressources/rstudio_images/push2.png differ diff --git a/module2/ressources/rstudio_images/push3.png b/module2/ressources/rstudio_images/push3.png new file mode 100644 index 0000000000000000000000000000000000000000..2aef7e727965bbc425f9843813335a20a41f2f09 Binary files /dev/null and b/module2/ressources/rstudio_images/push3.png differ diff --git a/module2/ressources/rstudio_images/push4.png b/module2/ressources/rstudio_images/push4.png new file mode 100644 index 0000000000000000000000000000000000000000..7b27dfceeb87ce3864f6377661f81ae9b1d00816 Binary files /dev/null and b/module2/ressources/rstudio_images/push4.png differ diff --git a/module2/ressources/rstudio_images/rstudio.png b/module2/ressources/rstudio_images/rstudio.png new file mode 100644 index 0000000000000000000000000000000000000000..f856d763e49e05c6545936de70d335361c90dd41 Binary files /dev/null and b/module2/ressources/rstudio_images/rstudio.png differ