forked from cis-ds/course-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git01.Rmd
62 lines (45 loc) · 2.31 KB
/
git01.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
---
title: "Install Git"
output:
html_document:
toc: TRUE
toc_depth: 1
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(cache=TRUE)
```
# Git Installation: Windows
In this class you will need to run commands from the Bash [shell](shell.html). Windows does not automatically include this (instead it has the Command Prompt). To maintain as much consistency across operating systems as possible, you need to install both the shell interface and Git. To do this, follow these instructions or watch the [video tutorial](https://www.youtube.com/watch?v=339AEqk9c-8):
1. Download the Git for Windows [installer](https://git-for-windows.github.io/).
2. Run the installer and follow the steps bellow:
1. Click on "Next".
2. Click on "Next".
3. Click on "Next".
4. Click on "Next".
5. Click on "Next".
6. **Select "Use Git from the Windows Command Prompt" and click on "Next".** If you forgot to do this programs that you need for the workshop will not work properly. If this happens rerun the installer and select the appropriate option.
7. Click on "Next". **Keep "Checkout Windows-style, commit Unix-style line endings" selected.**
8. **Select "Use Windows' default console window" and click on "Next".**
9. Click on "Next".
10. Click on "Finish".
3. If your "HOME" environment variable is not set (or you don't know what this is):
1. Open command prompt (Open Start Menu then type `cmd` and press [Enter])
2. Type the following line into the command prompt window exactly as shown:
`setx HOME "%USERPROFILE%"`
3. Press [Enter], you should see `SUCCESS: Specified value was saved.`
4. Quit command prompt by typing `exit` then pressing [Enter]
This will provide you with both Git and Bash in the Git Bash program.
# Git Installation: Mac OS X
[Video tutorial](https://www.youtube.com/watch?v=9LQhwETCdwY)
Mac OS X already includes the shell, so all you need to do is install Git. You can obtain and install it from [here](https://git-scm.com/downloads).
# Git Installation: Linux
If Git is not already available on your machine you can try to install it via your distro's package manager.
Debian/Ubuntu
`sudo apt-get install git`
Fedora/Redhat Linux
`sudo yum install git`
### Acknowledgments {.toc-ignore}
```{r child='_ack_stat545.Rmd'}
```
```{r child='_ack_swcgit.Rmd'}
```