我正在使用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上的特性,只想将我的更改提交到远程,谢谢!
git checkout develop && git pull origin
会创建一个 "Merging origin/develop into develop" 的提交信息,这不是我们想要的。在这种情况下,使用git checkout develop && git rebase origin
(又名git pull --rebase origin
)会更好。 - PeterBdevelop
和origin/develop
分叉了,但这并不是常见情况。 - CharlesB