git pull --all在工作树上不起作用

时间:2020-03-14 05:31:09

标签: git

我使用git 2.25.1和worktree功能。我在其他目录中有一个主分支和一些孤立分支。如果我在主目录上执行git pull --all,则提取将按预期进行。

$ git pull --all
Fetching origin
Already up to date.

但是,如果我要推送,它会抱怨其中一个工作树目录尚未更新。

$ git push
Branch 'release-1.4' set up to track remote branch 'release-1.4' from 'origin'.'
stderr: 'To http://localhost:8080/foo.git
! [rejected]              bar -> bar (non-fast-forward)
error: failed to push some refs to 'http://root@localhost:8080/foo.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.'

为什么git pull --all也不能同步工作树目录?还是这样做,我误解了错误消息?

0 个答案:

没有答案