Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit edd197b

Browse files
Clarified how-to including fork and pull request creation, in response to issue #40.
1 parent 0aab8df commit edd197b

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

content/posts/how-to-contribute/index.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,22 @@ resources:
1616

1717
Matplotblog relies on your contributions to it. We want to showcase all the amazing projects that make use of Matplotlib. In this post, we will see which steps you have to follow to add a post to our blog.
1818

19-
To manage your contributions, we will use [Git pull requests](https://yangsu.github.io/pull-request-tutorial/). So, if you have not done it already, you first need to clone [our Git repository](https://github.com/matplotlib/matplotblog), by typing the following in a terminal window:
19+
To manage your contributions, we will use [Git pull requests](https://yangsu.github.io/pull-request-tutorial/). So, if you have not done it already, you first need to fork and clone [our Git repository](https://github.com/matplotlib/matplotblog), by clicking on the Fork button on the top right corner of the Github page, and then type the following in a terminal window:
2020
```
21-
git clone https://github.com/matplotlib/matplotblog.git
21+
git clone [email protected]:[USERNAME]/matplotblog.git
22+
```
23+
where [USERNAME] should be replaced by your Github username. You now have to make sure that if you reuse this forked repository, it is up to date with the main Matplotblog repository. To do so, type the following:
24+
```
25+
git remote add upstream https://github.com/matplotlib/matplotblog.git
26+
```
27+
28+
You should now create a new branch, which will contain your changes. First, checkout the master:
29+
```
30+
git checkout master
31+
git merge upstream/master
2232
```
2333

24-
Then, you should create a new branch, which will contain your changes.
34+
and then create a new branch and check it out:
2535

2636
```
2737
cd matplotblog
@@ -83,11 +93,18 @@ hugo server
8393
```
8494
Then open the browser and visit [http://localhost:1313/matplotblog](http://localhost:1313/matplotblog) to make sure your post appears in the homepage. If you spot errors or something that you want to tune, go back to your index.md file and modify it.
8595

86-
When your post is ready to go, you can add it to the repository, commit and push the changes to your branch:
96+
When your post is ready to go, you can add it to your local repository, commit and push the changes to your branch:
8797
```
8898
git add content/posts/my-fancy-title
8999
git commit -m "Added new blog post"
90100
git push
91101
```
92102

93-
Finally, submit a pull request to have our admins review your contribution and merge it to the master repository. That is it folks!
103+
Finally, submit a **pull request** to have our admins review your contribution and merge it to the master repository. To do so, type the following:
104+
```
105+
git checkout post-my-fancy-title
106+
git rebase master
107+
```
108+
and then go to the page for your fork on GitHub, select your development branch, and click the pull request button. Your pull request will automatically track the changes on your development branch and update. Further info on the pull request process are available [here](https://docs.github.com/en/enterprise/2.16/user/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
109+
110+
That is it folks!

0 commit comments

Comments
 (0)