gpt4 book ai didi

git - "git pull --rebase"导致 "Cannot rebase onto multiple branches"

转载 作者:IT王子 更新时间:2023-10-29 01:29:13 56 4
gpt4 key购买 nike

所以,我的工作环境恰好有一个分支,在 Github 上有一个远程伴侣。我正在尝试执行 git pull --rebase 以防止 git push 创建 merge 提交消息,这些消息不会向从事该项目的其他人提供新信息,并且把作品搞砸了。但是当我尝试这样做时,它给了我这个:

From https://github.com/our_profile/our_repository
* branch HEAD -> FETCH_HEAD
Cannot rebase onto multiple branches

并且 pull 中止。调用 git branch 通知我本地机器上只有一个分支,这是怎么回事?

最佳答案

尝试准确指定要 pull 的远程分支:

git pull --rebase origin branch

或者,您也可以先从远程存储库git fetch 所有更改,然后手动 rebase :

git rebase origin/branch

关于git - "git pull --rebase"导致 "Cannot rebase onto multiple branches",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9984287/

56 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com