gpt4 book ai didi

pull 其他分支后GIT无法推送

转载 作者:行者123 更新时间:2023-12-05 07:54:10 25 4
gpt4 key购买 nike

我在 admin 分支上工作,但我需要在 develop 分支中完成一些事情,所以 git pull origin develop 是我的选择。

经过几天的工作(仍在 admin 上,但有一些 develop 事情)我想推送到 admin 以便一切正常。

我收到这个错误
! [rejected] admin -> admin(非快进)
错误:无法将某些引用推送到“git@git.mygit.com:mygit/mygit.git”
consejo: 更新被拒绝,因为你当前分支的提示落后了
consejo:它的远程对应物。集成远程更改(例如
consejo: 'git pull ...') 在再次推送之前。
consejo:有关详细信息,请参阅“git push --help”中的“关于快进的注意事项”。

如果我尝试执行 git pull,我会再次从 develop 中获取东西并破坏我所做的一切(我正在使用 rebase) 即使我执行 git pull origin admin

我是唯一一个在 admin 分支上工作的人,develop 一个人也没有接触 admin

git branch -vv

* admin   238eab7 [origin/admin: ahead 37, behind 9] Entidades remodeladas. Mapeo de entidades separadas a YAML para mejor organización Limpieza de varias cosas que sobraban (bundles y demás) Separadas las configuraciones por tipo. Separados los servicios por bundle y tipo siguiendo las recomendaciones de Symfony2
develop 7cc5c84 [origin/develop: behind 22] Eurotax funcinoando. Quitado Memcached en el entorno de DEV para DQL y metido en PROD

最佳答案

如果您使用 rebase 选项进行 pull ,您将进行管理更改并置于开发更改之上(使用新提交)。所以管理分支上的提交不再存在于你的本地分支上,它被新的替换了。如果您确定您的更改是正确的,则必须使用 --force 选项进行推送。喜欢:

git push --force origin admin

当您使用 --rebase 选项进行 pull 时,您必须使用 --force 来替换远程存储库中的内容。

关于 pull 其他分支后GIT无法推送,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31562471/

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