ainopara
V2EX  ›  问与答

有没有人比较熟悉 Github 的 pull request 那一套流程?

  •  
  •   ainopara · Oct 4, 2014 via iPad · 8441 views
    This topic created in 4248 days ago, the information mentioned may be changed or developed.
    比如说我提交了一次pull request,对面接受了,同时也接受了其他人的pull request。
    但是我这里由于是自己fork出来的分支,原始repo的更新并不会自动合并过来。
    我若想基于对面最新的代码继续改进并提交新的pull request,是不是只能把当前fork的删掉,重新fork一遍?
    这样太麻烦了,没有什么办法能让我的代码和原始repo保持一致吗?
    3 replies    2014-10-04 00:59:04 +08:00
    zeroch
        1
    zeroch  
       Oct 4, 2014   ❤️ 1
    1. Multiple Remote. 你在本地保持一个fork过来的branch. keep update it. (git remote add & git fetch or git pull).
    2. git merge, 保持好你自己的branch的时候, merge对面的branch过来..解决confilct的问题.
    3. 再次提交Pull request的时候, rebase好你的tree. 只提交必要的commit.
    Phariel
        2
    Phariel  
       Oct 4, 2014   ❤️ 1
    您需要仔细阅读一下github的help: https://help.github.com/articles/syncing-a-fork/
    ainopara
        3
    ainopara  
    OP
       Oct 4, 2014
    @zeroch
    @Phariel
    感谢两位的回答。我刚刚试着在本地的副本中,把原repo添加进remote中。
    添加了这个新的remote后就可以把后来的更新pull下来,也可以把最新的版本push回我在github上的fork分支去了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5335 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 07:38 · PVG 15:38 · LAX 00:38 · JFK 03:38
    ♥ Do have faith in what you're doing.