git - 即使没有变化也无法快进

标签 git

我最终进入了一个奇怪的 git 状态。我想从服务器 pull ,只快进。

然而,即使没有任何变化,git 也一直告诉我“不可能快进”。

$ git pull -v --ff-only
From github.com:username/repo
 = [up to date]      branch    -> origin/branch
 = [up to date]      branch2    -> origin/branch2
 = [up to date]      branch3    -> origin/branch3
fatal: Not possible to fast-forward, aborting.

我如何让 git 告诉我更多关于快进的“不可能性”的信息?我不能更详细...

最佳答案

您在“开发”分支上的提交与“原始”分支上的提交不匹配。这样做:

git pull origin develop --rebase

关于git - 即使没有变化也无法快进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28973554/

相关文章:

git - 如何与远程分支的父分支保持同步

git diff 用于存储中的单个文件

git - 从特定提交中恢复对特定文件的更改

git - 在 cron 作业中从 gitolite 中 pull

git - 将提交的 git 文件移动到另一个目录

GIT 与 SVN : How is it different in terms of commit (in GIT) and just save the changes locally in the file (in SVN)

git - 推送到远程的提交时间

git - git Branch -a 没有显示新分支

git - 解决 IDE 中的 merge 冲突,同时保留 3 向 merge 信息

git - 使用 `curl` 通过双因素身份验证在 GitHub.com 上创建一个 repo