1
- # Exercise to practice collaborative forking workflow
1
+ ### Exercise to practice collaborative forking workflow
2
2
3
3
We will run this exercise in groups and we number the groups
4
4
1, 2, ..., etc.
5
5
6
-
7
- ## Objectives
6
+ Objectives:
8
7
9
8
- Learn how to fork, modify the fork, and file a pull request towards forked repo
10
9
- Learn how to update your fork with upstream changes
11
10
12
11
13
- ## First part: Fork, clone, and modify
12
+ #### First part: Fork, clone, and modify
14
13
15
- First fork this repository and then clone the fork.
14
+ First fork this repository ion GitHub into your namespace and then clone the fork to your computer .
16
15
17
16
Then add a file ` groupN.py ` where N is your group number, e.g. ` group17.py ` .
18
17
19
18
This file should contain a function called ` tweet() ` which returns
20
19
a string of maximum 140 characters, for instance:
20
+
21
21
``` python
22
22
def tweet ():
23
23
return " please replace this boring sentence with something more fun"
@@ -27,31 +27,33 @@ The file `main.py` automatically calls all `tweet()` functions defined in files
27
27
` groupN.py ` (1 <= N <= 50). You do not need to edit ` main.py ` .
28
28
29
29
You can test it:
30
- ```
30
+
31
+ ``` shell
31
32
$ python main.py
32
33
33
34
group 17 says: please replace this boring sentence with something more fun
34
35
```
35
36
36
- Once you see your sentence correctly printed, commit and push. Don't worry
37
+ Once you see your sentence correctly printed, commit and push to your fork. Don't worry
37
38
nothing gets out to Twitter but please mind that your changes will be public on
38
39
GitHub (but you can delete them later).
39
40
40
41
41
- ## Second part: File a pull request
42
+ #### Second part: File a pull request
42
43
43
44
Then file a pull request towards the repository where you forked from.
44
45
45
46
Wait until we integrate all pull requests into the central repo
46
- together.
47
+ together on the big screen .
47
48
48
49
49
- ## Third part: Update your fork
50
+ #### Third part: Update your fork
50
51
51
52
We do this part ** after the contributions from all groups have been integrated** .
52
53
53
54
Once this is done, practice to update your forked repo with the upstream
54
55
changes and verify that you got the files created by other groups:
55
- ```
56
+
57
+ ``` shell
56
58
$ python main.py
57
59
```
0 commit comments