Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git pull必须被调用两次-在获取后停止,然后只执行合并_Git_Bitbucket_Git Bash - Fatal编程技术网

git pull必须被调用两次-在获取后停止,然后只执行合并

git pull必须被调用两次-在获取后停止,然后只执行合并,git,bitbucket,git-bash,Git,Bitbucket,Git Bash,我遇到了与git pull命令相关的奇怪行为。它似乎只执行fetch,然后停止。第二个git pull更新执行合并的本地分支 这是命令的输出: $ git co develop Switched to branch 'develop' Your branch is behind 'origin/develop' by 45 commits, and can be fast-forwarded. (use "git pull" to update your local branch) $ gi

我遇到了与git pull命令相关的奇怪行为。它似乎只执行fetch,然后停止。第二个git pull更新执行合并的本地分支

这是命令的输出:

$ git co develop
Switched to branch 'develop'
Your branch is behind 'origin/develop' by 45 commits, and can be fast-forwarded.
 (use "git pull" to update your local branch)

$ git pull
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.

$  git st
On branch develop
Your branch is behind 'origin/develop' by 47 commits, and can be fast-forwarded.
 (use "git pull" to update your local branch)
nothing to commit, working directory clean

$ git pull
Updating f80464f..61ee4c1
Fast-forward
.../i18n/Views.Account.Login.es.resx               |    2 +-
.../i18n/Views.Account.Login.fr.resx               |    2 +-
.../i18n/Views.Account.Login.id.resx               |    2 +-
...here goes list of files
我在Windows上使用git bash,远程git服务器是Atlassian的BitBucket。
什么会导致这种行为?

git联合开发

当您从一个分支切换到另一个分支,并且已经有人向该分支推送了某个内容时,您会看到
您的分支在后面
消息

git pull

这将尝试提取原始/开发引用,但您的分支未与其合并

您需要通过发出此命令来合并已提取的内容

git合并来源/开发


现在更改的分支
develope
origin/develope
处于同步状态

可能是提取触发了后台垃圾回收,这可能会阻止后续合并。尝试设置
git-config-gc.autoDetach-false
并查看是否在此之后发生。

您可以将
-v
传递给git-pull进行详细输出,下次尝试。尝试
git-pull-origin-develope
并仍然可以看到第一次pull的issuecheck退出代码(
echo$?
就在bash中的命令之后)。可能出现了一些错误,而这些错误恰好是silent@Tom@max360这是一个有效的观点,目前我做的每一个
git pull
都是这样,但是我无法重现这个问题-可能有一次听起来很有趣,我已经设置了它,没有观察到进一步的复杂情况。接受答案。这不是真的-请参阅for
git pull
-“将远程存储库中的更改合并到当前分支中。在默认模式下,git pull是git fetch的缩写,后跟git merge fetch\u HEAD。”