V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
pyKun
V2EX  ›  问与答

如何维护要跟紧上游的二次开发代码?

  •  
  •   pyKun · Jun 1, 2015 · 3522 views
    This topic created in 3994 days ago, the information mentioned may be changed or developed.
    需求是:上游代码作为code base,我们在此基础上开发。上游代码更新频繁,我们的代码也更新的频繁。CI系统以验证我们自己的私有代码为主,上游代码更新大概一个月一更新吧。这样的话有没有不错的最佳实践?

    现有的想法:
    1. 私有代码入库,每个月把上游的代码一个一个commit合过来,冲突手动解决
    2. 私有代码以patch文件的形式入库,打包编译的时候,把patch apply进到code base先,冲突则根据功能修改patch

    还有没有其他的方法没?
    3 replies    2015-06-02 22:40:20 +08:00
    mengzhuo
        1
    mengzhuo  
       Jun 1, 2015 via iPhone   ❤️ 1
    1比较靠谱
    我们目前也是用这种方法
    pyKun
        2
    pyKun  
    OP
       Jun 1, 2015
    @mengzhuo
    具体是
    git remote add xx 上游地址
    git fetch upstream
    git merge remote/xx/master
    么?
    mengzhuo
        3
    mengzhuo  
       Jun 2, 2015   ❤️ 1
    git remote add xx 上游地址
    git pull --rebase xx branch
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3263 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 13:42 · PVG 21:42 · LAX 06:42 · JFK 09:42
    ♥ Do have faith in what you're doing.