forked from NCEAS/training-git-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetting-started-with-git-rstudio.Rmd
133 lines (87 loc) · 3.7 KB
/
getting-started-with-git-rstudio.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
title: "Getting starting with git and GitHub using RStudio"
author: "NCEAS"
maintainer: "Julien Brun"
last_updated_by: "Julien Brun"
output:
html_document:
include:
after_body: footer.html
theme: "spacelab"
# df_print: "paged"
toc: true
toc_depth: 2
toc_float: true
number_sections: true
params:
output_dir: "docs"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# rmarkdown::render("getting-started-with-git-rstudio.Rmd", output_dir = "docs")
```
<br>
<br>
This document is a compilation of [NCEAS](https://github.com/NCEAS/) training material on version control to create a 45-60 min crash course on getting started with version control for RStudio users. You will learn:
- how to setup git on your machine
- how to create repository on GitHub
- git basic workflow an manipulations using RStudio
- Collaborating using git and GitHub
<br>
<br>
```{r version control, child = './modules/version-control-intro.Rmd'}
```
---
<br>
```{r git intro, child = './modules/git-intro.Rmd'}
```
---
<br>
```{r setting computer, child = './modules/git-setting-computer.Rmd'}
```
---
<br>
```{r first repo, child = './modules/git-first-repo.Rmd'}
```
---
<br>
```{r git basics, child = './modules/git-workflow.Rmd'}
```
---
<br>
```{r git collaboration repo, child = './modules/git-collaboration.Rmd'}
```
---
<br>
```{r git conflicts repo, child = './modules/git-conflicts.Rmd'}
```
---
<br>
# References
## Using RStudio:
- R packages - Git and GitHub: http://r-pkgs.had.co.nz/git.html#git-init
- Happy Git and GitHub for the useR: http://happygitwithr.com/
## Mainly from the command line:
- Interactive git 101: [https://try.github.io/](https://try.github.io/)
- Very good tutorial about git: [https://www.atlassian.com/git/tutorials/what-is-version-control](https://www.atlassian.com/git/tutorials/what-is-version-control)
- Git tutorial geared towards scientists: [http://nyuccl.org/pages/gittutorial/](http://nyuccl.org/pages/gittutorial/)
- Short intro to git basics: [https://github.com/mbjones/gitbasics](https://github.com/mbjones/gitbasics)
- Git documentation about the basics: [http://gitref.org/basic/](http://gitref.org/basic/)
- Git documentation - the basics: [https://git-scm.com/book/en/v2/Getting-Started-Git-Basics](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics)
- Git terminology: [https://www.atlassian.com/git/glossary/terminology](https://www.atlassian.com/git/glossary/terminology)
- In trouble, guide to know what to do: [http://justinhileman.info/article/git-pretty/git-pretty.png](http://justinhileman.info/article/git-pretty/git-pretty.png)
- Want to undo something? <https://github.com/blog/2019-how-to-undo-almost-anything-with-git>
- Git terminology: <https://www.atlassian.com/git/glossary/terminology>
- 8 tips to work better with git: <https://about.gitlab.com/2015/02/19/8-tips-to-help-you-work-better-with-git/>
- GitPro book (2nd edition): <https://git-scm.com/book/en/v2>
## GitHub Workflow
- GitHub:
- guides on how to use GitHub: [https://guides.github.com/](https://guides.github.com/)
- GitHub from RStudio: [http://r-pkgs.had.co.nz/git.html#git-pull](http://r-pkgs.had.co.nz/git.html#git-pull)
- Forking:
- [https://help.github.com/articles/fork-a-repo/](https://help.github.com/articles/fork-a-repo/)
- [https://guides.github.com/activities/forking/](https://guides.github.com/activities/forking/)
- Comparison of git repository host services: <https://www.git-tower.com/blog/git-hosting-services-compared/>
- Branches
- interactive tutorial on branches: <http://learngitbranching.js.org/>
- using git in a collaborative environment: <https://www.atlassian.com/git/tutorials/comparing-workflows/centralized-workflow>