【问题标题】:In git how to merge the Feature branch into Main branch and then Resynchronize在 git 中如何将 Feature 分支合并到 Main 分支然后重新同步
【发布时间】:2021-11-06 11:48:27
【问题描述】:

我们从主分支“main”创建了一个功能分支“feature”。

我们对“feature”进行了更改,然后合并到“main”中

与此同时,其他人也将他们的更改合并到“main”中。如果我们希望“main”中的这些更改也回到“feature”,那么最好的方法是什么 - 即我们希望将“feature”与“main”重新同步

【问题讨论】:

    标签: git github merge branch synchronize


    【解决方案1】:

    我的建议: 再次查看主分支:

    git checkout main
    

    拉取最新更改:

    git pull
    

    再次签出功能分支并将主分支合并到功能分支中:

    git checkout feature
    git merge main
    

    你可以更快地做到这一点,但这是 - 对我来说 - 最直观的方式。

    【讨论】:

      猜你喜欢
      • 2017-03-28
      • 1970-01-01
      • 1970-01-01
      • 2017-10-11
      • 1970-01-01
      • 2019-03-11
      • 2022-11-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多