Home  >  Q&A  >  body text

Github关于fork的小问题

Github新人,刚开始学习,希望大神解答一下疑惑
1.fork了开源项目之后如何确认提交代码是在自己的fork项目里做修改?
主要是担心操作错了push给了原作者造成困扰就不好了。
2.如何将开源项目最新的修改同步到我的fork里来又不影响我已经做的修改?

怪我咯怪我咯2748 days ago744

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-05-02 09:39:40

    Don’t worry, you can only modify the project you forked, you have no right to modify the original author’s project. If you need to push something to the original project, you need to use Pull Request and get the consent of the original author.
    To synchronize the modifications of the original project, you first need to clone your code locally, add the address of the original project to the remote warehouse list, and then merge the two through merging.

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-02 09:39:40

    1. How can you push to the original author without giving you permission? Don’t worry
    2. Fork the author into a new branch, and remove the source of the original author from your own branch

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-02 09:39:40

    1. No, as long as what you clone is your own fork project

    2. Suppose a new remote is your original project, then pull the above changes to one of your branches, and then merge them into your trunk

    reply
    0
  • Cancelreply