Skip to content

Commit 53d0d22

Browse files
committed
More explanations on how to contribute with fork
1 parent 7a0ec40 commit 53d0d22

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

docs/sources/developers.rst

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,49 @@
11
Contributing
22
============
33

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-
104
The development of StagPy is made using the Git version control system. The
115
first three chapters of the `Git book`__ should give you all the necessary
126
basic knowledge to use Git for this project.
137

148
.. __: https://git-scm.com/book/en/v2
159

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
1815

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
2020
% cd StagPy
2121

2222
.. __: https://help.github.com/articles/connecting-to-github-with-ssh/
2323

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+
2447
Testing
2548
-------
2649

0 commit comments

Comments
 (0)