git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
balancircle
V2EX  ›  git

请教一个 git 代码移植的问题

  •  
  •   balancircle · Jul 3, 2023 · 2409 views
    This topic created in 1047 days ago, the information mentioned may be changed or developed.
    请教一个 git 代码移植的问题:
    比如,我下载了 ShardingSphere 的 github 源码。
    然后,自己基于 master 分支,新建了一个分支,修改了某些适用于自己业务的源码,提交到公司的私服 gitlab 上。
    后续如何把 github 上的 fixbug 的源码,“移植”到自己公司私有 gitlab 上的呢?
    5 replies    2023-07-03 21:09:29 +08:00
    wxg4net
        1
    wxg4net  
       Jul 3, 2023
    cherry-pick
    cwang22
        2
    cwang22  
       Jul 3, 2023   ❤️ 1
    设置两个 remote ,从 Github remote 上拉取 master 的新 commits ,然后合并到你自己的分支上,再提交到 gitlab remote
    unco020511
        3
    unco020511  
       Jul 3, 2023
    定期 rebase or merge
    unco020511
        4
    unco020511  
       Jul 3, 2023
    哦,你说的是两个隔离的仓库,对楼上说了,设置两个 remote
    balancircle
        5
    balancircle  
    OP
       Jul 3, 2023
    @cwang22 原来还可以设置两个 remote ,多谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   880 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:54 · PVG 04:54 · LAX 13:54 · JFK 16:54
    ♥ Do have faith in what you're doing.