github participate in open source projects

clone to local

  1. Have a registered account on GitHub, https://github.com/
  2. Find open source projects they are interested in, such as: https://github.com/wuhan2020/wuhan2020.github.io
  3. Tap the fork in the project home page
  4. Point your own avatar on the right side, click Your repositories, to find just the fork of the project
  5. The local repository to clone, cut to the respective branch, default dev
  6. Then you can play to their wisdom repair Bug, develop new features, a commit, push the

Request pull
7. When you contribute after the completion of your contribution can recommend to the developers of this project. Github open again, so there is a button on the page of your project, click on it
Here Insert Picture Description
8 will be displayed in a new page in your current changes, continue to click create pull request in the pop-up page, enter this submission Description information, input finished, click the submit button the Comment
Here Insert Picture Description
9. Moderated open source project management tasks, approved, the changes will be incorporated into the development branch corresponding
10. in addition to the contribution of the code involved in the project, we can also mention Issue, into the project home page, click and select New Issue Issue pop-up page, enter descriptive information to project bug

Source Synchronous
11. fork of the source branch may change due to the bug fix or update, in order to maintain their own local branch of the latest and to reduce conflicts when pull request, needs and source synchronous (mainly 2,4 step)

1. git remote -v
就可以看到当前项目的远程仓库配置:
origin  https://github.com/z2516305651/wuhan2020.github.io.git (fetch)
origin  https://github.com/z2516305651/wuhan2020.github.io.git (push)


2.然后使用下面的命令:
git remote add upstream 原始项目仓库的git地址:
git remote add upsteam https://github.com/wuhan2020/wuhan2020.github.io.git


3. 如果你继续使git remote -v命令查看的话,就会发现这个时候已经和原始的被fork的项目产生了关联:
origin  https://github.com/z2516305651/wuhan2020.github.io.git (fetch)
origin  https://github.com/z2516305651/wuhan2020.github.io.git (push)
upsteam https://github.com/wuhan2020/wuhan2020.github.io.git (fetch)
upsteam https://github.com/wuhan2020/wuhan2020.github.io.git (push)

4. 如果想保持项目同步的话,一般使用下面的命令就好了:
git fetch upstream
git merge upstream/dev
Published 50 original articles · won praise 47 · views 90000 +

Guess you like

Origin blog.csdn.net/z2516305651/article/details/104108514