|
1 | 1 | Contributing |
2 | 2 | ============ |
3 | 3 |
|
4 | | -If you want to contribute to development of StagPy, create an account on |
5 | | -GitHub_ and fork the `StagPy repository`__. |
6 | | - |
7 | | -.. _GitHub: https://github.com/ |
8 | | -.. __: https://github.com/StagPython/StagPy |
9 | | - |
10 | 4 | The development of StagPy is made using the Git version control system. The |
11 | 5 | first three chapters of the `Git book`__ should give you all the necessary |
12 | 6 | basic knowledge to use Git for this project. |
13 | 7 |
|
14 | 8 | .. __: https://git-scm.com/book/en/v2 |
15 | 9 |
|
16 | | -To get a local copy of your fork of StagPy, clone it (you can use `the SSH |
17 | | -protocol`__ if you prefer):: |
| 10 | +If you want to contribute to development of StagPy, create an account on |
| 11 | +GitHub_ and fork the `StagPy repository`__. |
| 12 | + |
| 13 | +.. _GitHub: https://github.com/ |
| 14 | +.. __: https://github.com/StagPython/StagPy |
18 | 15 |
|
19 | | - % git clone https://github.com/YOUR_USER_NAME/StagPy.git |
| 16 | +To get a local copy of your fork of StagPy, clone it (here using `the SSH |
| 17 | +protocol`__):: |
| 18 | + |
| 19 | + % git clone [email protected]:YOUR_USER_NAME/StagPy.git |
20 | 20 | % cd StagPy |
21 | 21 |
|
22 | 22 | .. __: https://help.github.com/articles/connecting-to-github-with-ssh/ |
23 | 23 |
|
| 24 | +Then add a remote (here called ``upstream``) pointing to the main StagPy |
| 25 | +repository:: |
| 26 | + |
| 27 | + % git remote add upstream [email protected]:StagPython/StagPy.git |
| 28 | + |
| 29 | +To sync your fork with the main repository, you can run the following:: |
| 30 | + |
| 31 | + % git switch master |
| 32 | + % git pull upstream master |
| 33 | + % git push origin |
| 34 | + |
| 35 | +To add your own modifications, create a new branch from the tip of master:: |
| 36 | + |
| 37 | + % git switch -c branch-name master |
| 38 | + |
| 39 | +where ``branch-name`` is the desired branch name. Modify the code as desired, |
| 40 | +commit it, and push it on your fork:: |
| 41 | + |
| 42 | + % git push -u origin branch-name |
| 43 | + |
| 44 | +You can then create a PR from your fork on GitHub to have your changes |
| 45 | +incorporated in the main repository and made available to other users. |
| 46 | + |
24 | 47 | Testing |
25 | 48 | ------- |
26 | 49 |
|
|
0 commit comments