gpt4 book ai didi

svn - merge git : via git-svn, 表示已经是最新的,但 git-diff 表示存在差异

转载 作者:行者123 更新时间:2023-12-04 06:53:25 25 4
gpt4 key购买 nike

我正在使用 git-svn 来处理代码库,我需要将主干中的更改 merge 到我的分支。

我在 git 中获取了两个分支,当我在我的分支中运行 git diff trunk 时,我可以看到所有的变化。

但是,当我运行 git merge head/trunk 时,我收到一条消息“已经是最新的”。

这显然不是最新的。我究竟做错了什么?

最佳答案

“已经是最新的”可能意味着:

  • 后备箱是 parent of master (trunk 的所有变化都已经 merge 到 master)
  • 或者您正在处理 detached head (如果您直接 checkout SHA1 提交引用或标签,则可能会发生这种情况)。

  • 注意:请注意 git svn caveats

    Merge tracking in Subversion is lacking and doing branched development with Subversion can be cumbersome as a result.
    While git svn can track copy history (including branches and tags) for repositories adopting a standard layout, it cannot yet represent merge history that happened inside git back upstream to SVN users.
    Therefore it is advised that users keep history as linear as possible inside git to ease compatibility with SVN

    For the sake of simplicity and interoperating with a less-capable system (SVN), it is recommended that all git svn users clone, fetch and dcommit directly from the SVN server, and avoid all git clone/pull/merge/push operations between git repositories and branches.
    The recommended method of exchanging code between git branches and users is git format-patch and git am, or just 'dcommit'ing to the SVN repository.

    关于svn - merge git : via git-svn, 表示已经是最新的,但 git-diff 表示存在差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2808253/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com