How to Create a Pull Request, an open source project ant design pro A Case Study

  Disclaimer: This article is my own reference write some tutorials on the network, after all, the first time I contribute to open source projects, it is hard not to feel a little excited with this article to document the process, and some operations simultaneously stay. later for reference.

  Background: The company recently made a project, specific project I can not say, anyway, with the React + Umi + Ant Design Pro specific is the case, use the official SettingDrawer realizes the function switch themes online, but the official controls. in the following there will be always displayed copy setting button.

However, I want results at right

 

 

 

 

 

     But after my project on line, do not need to copy the theme configuration share, only the development process may need to set the default theme, so I want to hide the controls, then go to the official repository issue raised demand. But I say to the author of the program is not perfect, only to hide the contents of the text area on the button. Ever since, asked the author, and provides a guideline, so it, let me mention of a pr. I saw pr, FML, PR is valid, looked under the information I found out that Pull Request, so we look at this thing in the end how to create and submit.

    The following is to create and submit their own solutions to some of the steps the official repository.

    1.Fork official warehouse

     Because of this I have no reputation, and very food developers, nor is it an official project of a team, and there is no authority to directly modify the warehouse, only the code compiled after local modifications, so I use it about it , so I want to let everyone use this feature, still need to be submitted to the official repository.

     Operating fork the official repository is very simple, first log in to your account to GitHub, and then search for ant design pro warehouses, click on the upper right corner Fork on the line. This time GitHub will automatically help you complete the work required.

     In order to facilitate Here I provide some Ant Design Pro  official repository of links

    2.Clone own account in warehouse

      This step of the operation is very simple, as usual operation to pull yourself projects, in their own working directory, open a command-line tool, type:      

      git clone https:github.com/xxxxxxxxxx

      等待完成后,就已经成功克隆项目了.

    3.使用自己喜欢的编辑器打开项目进行修改

        这一步没啥好说的,毕竟我也不知道你们想修改什么代码,或者添加什么bug,不过编辑器我这里还是可以安利一下Microsoft Visual Studio Code,若是其他C#或者C++的项目,建议Microsoft Visual Studio.Java项目的话当我没说.

    4.提交自己的代码

      改好代码后,留在本地当然没啥用,世界上除了你自己可能没有人知道你新增了什么bug,所以还是得提交到我们自己fork的仓库中.你可以新建一个分支,也可以直接提交到master分支,我这次不知道为什么新建分支,GitHub没有显示,刷新也出不来,只好提交到

        我仓库中的master分支上了.也没有什么影响.

    5.在GitHub页面上点击创建New Pull Request

        如图,点击创建新的rp这个时候Github会自动检测原仓库和你仓库的差异,然后写好相关文案提交就行了.接下来等待官方开发者进行合并就能完事了.

 

     本文参考 https://www.cnblogs.com/zhangjianbin/p/7774073.html 这位大佬的文章进行创建,相比于原文,我觉得我这个更适合小白一些.有什么建议欢迎大佬提醒

Guess you like

Origin www.cnblogs.com/dygood/p/12083085.html