git flow分支已经分歧

时间:2012-04-17 18:48:20

标签: git git-flow

我正在使用git flow工具,我遇到了一些问题。我的git分支已经分歧了。我已阅读master branch and 'origin/master' have diverged, how to 'undiverge' branches'?并试图按照这些步骤进行操作,包括尝试合并和重新绑定我的本地存储库。

    $  git flow feature finish showFindLogs
    Branches 'develop' and 'origin/develop' have diverged.
    And branch 'develop' may be fast-forwarded.
    $  git merge origin/develop
    Already up-to-date.
    $ git rebase origin/develop
    Current branch feature/showFindLogs is up to date.
    $ git status
    # On branch feature/showFindLogs
    nothing to commit (working directory clean)

我怎样摆脱这个?我已经完成了git flow功能,我只想将我的更改发送到遥控器。谢谢!

7 个答案:

答案 0 :(得分:113)

这里发生的是远程接收到更新,并且git-flow要求developorigin/develop在合并功能之前处于同一提交。这是为了防止在发布分支时出现不良冲突。

要解决此问题,您需要:

  1. 将您的本地developorigin:结帐develop同步,然后从origin拉到developgit checkout develop && git pull origin)< / p>

  2. 使用developgit flow feature rebase showFindLogs上修改您的功能。如果你运气不好,你可能会遇到冲突

  3. 检查它是否有任何破坏

  4. git flow feature finish showFindLogs

答案 1 :(得分:4)

确保您的ng-mouseover分支不落后于原点,也许您需要执行

develop

git checkout develop

git pull

继续发布过程

答案 2 :(得分:2)

你可能也想((只要它没有得到官方支持)补丁和)使用我的

git-flow feature finish -p选项

https://github.com/nvie/gitflow/pull/253

答案 3 :(得分:2)

我所要做的就是:

  1. Sub RemoveInvalid(ByRef arr As Variant, ByRef lastUsed As Long) Dim i As Long Dim j As Long j = 0 For i = 1 To UBound(arr, 1) ' Increment and copy row if valid If (IsNumeric(arr(i, 1)) Or IsDate(arr(i, 1))) And Not (IsEmpty(arr(i, 1))) And _ (IsNumeric(arr(i, 2)) Or IsDate(arr(i, 2))) And Not (IsEmpty(arr(i, 2))) Then j = j + 1 arr(j, 1) = arr(i, 1) arr(j, 2) = arr(i, 2) End If Next i lastUsed = j End Sub
  2. git checkout develop
  3. git pull origin develop
  4. git checkout feature/your_feature_name

答案 4 :(得分:0)

您可以使用此命令在完成功能之前从$ ORIGIN获取:

git flow feature finish -F <name>

docs

答案 5 :(得分:0)

对于使用 Hub-Flow 搜索此错误的人,只需执行以下操作:

target

答案 6 :(得分:-1)

为了解决这个问题,你可以使用我的git flow实现,基于@childno͡.de解决方案。

git flow feature/hotfix/release/bugfix  -e finish <name>

在控制台中安装git flow:

git clone https://github.com/wyhasany/gitflow-avh/;cd gitflow-avh/;git checkout feature/force_merge;git pull;sudo make install