Skip to content

Commit 52127fb

Browse files
committed
First example
1 parent 8924a95 commit 52127fb

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

docs/chapters/chapter_04.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 4 Learn the workflow from case studies
2+
3+
We have now installed Git on our local machine, familiarised ourselves with the interfaces, and tested out a local repository. However, to realize more advantages of version control (e.g. collaboration, improving reproducibility), we will need to take it online.
4+
5+
This chapter will guide you through exactly how this is done, step by step, from simpler use cases to more advanced ones.
6+
7+
As discussed previously, there are a wide variety of hosting services. Here, only as an example, we use the well-known GitHub platform as our remote server.
8+
9+
## 4.1 Starting a new single person repository
10+
11+
In this example, we will make a repository on GitHub and send our code to it, so that our local work is backed up online.
12+
13+
First, log in to GitHub. Click the "+" and then "New repository" on the top right corner.
14+
15+
![Create new repo](images/add-new-repo.png)
16+
17+
Then, give the new repo a meaningful name, and why not add a README file. Click the big green button at the bottom. Simple as that, we made a repository on GitHub.
18+
19+
ADD-IMAGE-IF-KNOW-WHAT-CODE-TO-USE
20+
21+
A very convenient feature of the online platforms like GitHub is that they allow us to make certain changes directly from the browser. For example, click into the `README.md` file, and then click on the pencil button on the right hand side:
22+
23+
![Edit button](images/edit-button.png)
24+
25+
Now we are in a text editor, and can make any changes we want to this file. Once finished, click the green "Commit changes" to save.
26+
27+
!!! info Note
28+
Why the "Commit changes", but not a simple "Save"? Remember, Git keeps a history for everything. By editing on from the browser, we have essentially done "saving the file", "stage the file" and "commit changes" with one step!
29+
175 KB
Loading
16.4 KB
Loading

0 commit comments

Comments
 (0)