【问题标题】:Pulling remote branch without checkout (from another branch) [duplicate]在没有结帐的情况下拉远程分支(从另一个分支)[重复]
【发布时间】:2019-10-28 01:30:53
【问题描述】:

我正在参与一个有许多分支的项目,当我在我的分支上工作时,另一个分支(例如master)在远程更新。我确实想在不更改当前分支(不签出)的情况​​下对其进行更改。这可能吗?如果可以,怎么做?

【问题讨论】:

    标签: git git-pull git-fetch


    【解决方案1】:

    试试 git fetch <remote> <source>:<destination>

    This 为我工作 git-forward-merge <source> <destination> 但它不适用于需要解决冲突的合并。

    【讨论】:

      【解决方案2】:

      https://git-scm.com/docs/git-fetch:

      git fetch origin master:master
      

      【讨论】:

        猜你喜欢
        • 2023-02-01
        • 2021-11-05
        • 2014-08-28
        • 1970-01-01
        • 2020-05-02
        • 1970-01-01
        • 2014-06-13
        • 1970-01-01
        相关资源
        最近更新 更多