ID = git_ask_01
Question
How to fork and contribute?
Answer
Follow the following procedure to make it.
Step1: Fork target project
This is done in Github
Step2: Clone project with your own git address
Go to your own page and copy the address.
$ git clone _your_own_address_
Step3: Cut branch for development
$ git checkout -b dev
Step4: Make all the changes in dev branch
After making all the changes, run the following command
$ git add .
$ git commit -m "description notes"
Step5: Switch to branch ‘master’
$ git checkout master
Step6: Merge with dev
$ git merge dev
Step7: Push to server
$ git pull
$ git push origin master
Step8: New pull request
If there is no conflict, we will find Able to merge in your Github, and then open a new pull request, then the owner will see this and treat it.
Step9: Delete branch ‘dev’
After done, delete the temporal branch ‘dev’
$ git branch -d dev
Extension
Qeustion_ex1
How to synchronize with source project after forked?
Answer_ex1
Add remote branch
For more details, see git_ask_02
本文详细介绍了如何在GitHub上通过Fork项目、创建分支、提交更改、发送Pull Request等步骤,为开源项目做出贡献的全过程。同时,还提供了如何同步源项目的最新变更的方法。

被折叠的 条评论
为什么被折叠?



