Skip to content

Commit 0d78592

Browse files
committed
Update git prep, several small fixes and small improvement
1 parent cdd34a0 commit 0d78592

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

resources/prep/git.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
[Git](https://git-scm.com/) is a popular version control system that is the foundation of most open source software development. You are not required to be a Git pro in advance of this event, but come prepared to learn a lot about it! [GitHub](https://github.com) is a hosting service for Git repositories, enabling us to share code across teams in a web environment.
66

7-
We will use Git and GitHub for collaborative work. Be sure to arrive at OceanHackWeek with your own [GitHub](https://github.com/) account.
7+
We will use Git and GitHub for collaborative work. Be sure to arrive at OceanHackWeek with your own [GitHub](https://github.com) account.
88

99
## Git Installation
1010

1111
* Windows
1212
* Install Git for Windows from this [link](https://gitforwindows.org/). For more setup details follow these [instructions](https://carpentries.github.io/workshop-template/#shell)
1313
* Mac OS
1414
* Download the [git installer](https://git-scm.com/download/mac) and run it.
15-
* Linux (Debian): `sudo apt install git-all`
15+
* Linux (Debian/Ubuntu): `sudo apt install git-all`
1616

1717
To test, open the terminal (on Windows, Git Bash) and setup your username and email:
1818

@@ -29,7 +29,7 @@ During the hackweek it will be useful to know how to navigate between files from
2929

3030
## Terminal (command line) text editor
3131

32-
When working on the command line (the terminal or shell), it is often handy to modify file content directly from there. For that you can use a command line editor such as [nano](https://linuxize.com/post/how-to-use-nano-text-editor/). On Mac and Linux it is usually pre-installed, but for Windows you can follow the instructions in this [link](http://carpentries.github.io/workshop-template/#editor) to set it up. Test your installation by opening a terminal and running `nano --version`. If it works you can link your git configuration with `nano`:
32+
When working on the command line (the terminal or shell), it is often handy to modify file content directly from there. For that you can use a command line editor such as [nano](https://linuxize.com/post/how-to-use-nano-text-editor/). On Mac and Linux it is usually pre-installed, and on Windows it is installed when you install Git (see [here](http://carpentries.github.io/workshop-template/#editor) for more information about nano and its configuration). Test your installation by opening a terminal and running `nano --version`. If it works you can link your git configuration with `nano`:
3333

3434
```bash
3535
git config --global core.editor "nano -w"
@@ -45,7 +45,7 @@ Steps 1-5 focus on the Git "centralized workflow". We present it here as an illu
4545

4646
### 1. Create a project repository
4747

48-
On your own or someone in your project group (preferably one who has never done it before), create a repository for the project under the {OceanHackWeek organization, [https://github.com/oceanhackweek](https://github.com/oceanhackweek)
48+
On your own or someone in your project group (preferably one who has never done it before), create a repository for the project under the `oceanhackweek` organization, `https://github.com/oceanhackweek`
4949

5050
![New Repo](../img/newRepo.png)
5151

@@ -58,7 +58,7 @@ Click `New` and follow the steps: check yes to create a `README.md` file.
5858

5959
### 2. Clone the repository
6060

61-
Each participant should clone the repository so they have their copy on their JupyterHub account space (and locally in the participant's computer, if desired). Navigate through the terminal to the folder where you want to keep {OceanHackWeek work (`cd path_to_oceanhackweek`).
61+
Each participant should clone the repository so they have their copy on their JupyterHub account space (and locally in the participant's computer, if desired). Navigate through the terminal to the folder where you want to keep OceanHackWeek work (`cd path_to_oceanhackweek`).
6262

6363
```bash
6464
git clone https://github.com/oceanhackweek/ohw22-proj-myprojectname.git
@@ -98,21 +98,23 @@ To continue practicing these steps, make more changes to the title and the descr
9898

9999
![Centralized Workflow](../img/centralized_workflow.png)
100100

101-
*Ran into a problem?*
102101

103-
When working with several people sometimes you
102+
```{admonition} *Ran into a problem?*
103+
:class: attention
104104
105-
* cannot push because changes have been made that have not been incorporated: need to first pull
106-
* when pulling you arrive into a merge conflict: need to resolve the conflict manually
105+
When working with several people sometimes you
107106
107+
* Cannot push because changes have been made that have not been incorporated: need to first pull
108+
* When pulling you arrive into a merge conflict: need to resolve the conflict manually
109+
```
108110

109111
### 5. Resolving the merge conflict
110112

111113
```bash
112114
git status
113115
```
114116

115-
You will see the file/s which caused the merge conflict in green.
117+
You will see the file(s) which caused the merge conflict in green.
116118

117119
Open it and detect the conflict by the special format:
118120

@@ -160,7 +162,7 @@ Forks are public copies of the main repo, from which you can submit changes to t
160162
* Fork the public repo (click on the *Fork* button)
161163
![](../img/fork_button.png)
162164
* Note it looks the same but the web address contains your username
163-
[https://github.com/myghusername/ohw22-proj-myprojectname](https://github.com/myghusername/ohw22-proj-myprojectname)
165+
`https://github.com/myghusername/ohw22-proj-myprojectname`
164166
* Go to your local repo and rename your `origin` to point to the fork:
165167

166168
```bash

0 commit comments

Comments
 (0)