gpt4 book ai didi

git - 无法将某些引用推送到 'https://github.com/myname/myrepo'

转载 作者:太空狗 更新时间:2023-10-29 14:27:23 26 4
gpt4 key购买 nike

关于 magit/push 的问题

我开始使用 magit,对 git 的经验很少。

我已经成功完成了 magit 手册:

adding
ignoring
staging
commiting locally

然后,我尝试在 github.com/myname 上推送。为此,我使用“P P”,然后输入我的用户名和密码。

如果失败

To https://github.com/myname/myrepo ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/myname/myrepo'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push –help' for details.

git exited abnormally with code 1.

我想我会像这里提到的那样解决它git config --global push.default 当前但这没有帮助。

我对 Geting an error pushing to github - Updates were rejected because a pushed branch tip is behind its remote 感兴趣但没有得到它的工作

有什么想法吗?

最佳答案

您必须先pull 更改或push -f 更改。

关于git - 无法将某些引用推送到 'https://github.com/myname/myrepo',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14801972/

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