You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/posts/how-to-contribute/index.md
+22-5Lines changed: 22 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,22 @@ resources:
16
16
17
17
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.
18
18
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:
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:
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
22
32
```
23
33
24
-
Then, you should create a new branch, which will contain your changes.
34
+
and then create a new branch and check it out:
25
35
26
36
```
27
37
cd matplotblog
@@ -83,11 +93,18 @@ hugo server
83
93
```
84
94
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.
85
95
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:
87
97
```
88
98
git add content/posts/my-fancy-title
89
99
git commit -m "Added new blog post"
90
100
git push
91
101
```
92
102
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).
0 commit comments