forks.md 1.63 KB
Newer Older
1
# What is a `fork`?
2

3
4
5
<img src="slides/img/fork.jpg" class="as-is" height="500em"/>
<!--http://www.cndajin.com/data/wls/246/22302193.jpg-->

6
7


8
# Not really ...
9
10
11

<img src="slides/img/fork-crossed.png" class="as-is" height="500em"/>

12
13


14
# What is a `fork`?
15

16
17
18
19
20
21
22
23
24
25
26
In general, when contributing to a repository, you only have **read** access.

In other words, you can only **pull** (unless it is your own repository or access has been granted).

In general, you **cannot write** changes. In other words, you do not have **push** access.

You have to work on your **own copy**.

In other words, you have to work on your own <font color="red">**fork**</font>.


27

28
# How to get a fork?
29
30
31
32
33

Browse to the original repository and click on the button `Fork`:

![Fork the repo](https://help.github.com/assets/images/help/repository/fork_button.jpg)

34
<img src="slides/img/icon-live-demo.png" height="100px">
35
36
37



38
# Time to practice!
39
40

Fork the practice repository: <br><br>
41
https://github.com/LCSB-BioCore/basic-git-practice
42
43
44

Then, clone your fork to your home directory!

45
<img src="slides/img/icon-live-demo.png" height="100px">
46
47

```bash
48
$ git clone git@github.com:<yourName>/basic-git-practice.git
49
50
51
52
```

Change to the practice directory with:
```bash
53
$ cd basic-git-practice
54
55
56
```


57

58
# A note on shortcuts ...
59

60
61
62
63
64
65
66
67
<font color="red">
Any other rudimentary method such as

*'I simply download the `.zip` and unzip it - works like a charm!'*

shall **be avoided**!
</font>

68
69
**Why?**

70
71


72
# How to update my fork?
73
74
75

As you have your own fork, it will not automatically update once the original repository is update.

76
![bulb](slides/img/bulb.png) You have to update it yourself!
77
78
79

**More on that later!**