繁体   English   中英

Git Gui 我无法推送到 Github

[英]Git Gui I can't push to Github

我无法将我的文件推送到 Github。 错误:

 Pushing to https://github.com/Brogolem35/project.git To https://github.com/Brogolem35/project.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/Brogolem35/project.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (eg, 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我不知道如何解决它。 我也试过 Git Bash。 它给了我同样的问题。

你要么:

  1. 执行git pull ... ,尝试合并并解决冲突(如果有),然后您将能够git push
  2. git push -f ... 但是要小心这个,只有当你重新定位本地存储库并想要推送到非公共分支时才应该使用它。

如果您不确定该怎么做,第一个是最安全的选择。

请阅读留言:

error: failed to push some refs to 'https://github.com/Brogolem35/project.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first 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 GUI 中进行操作。 我遇到了同样的问题并通过使用合并菜单选项解决了它在此处输入图像描述

我有同样的问题 。

我用了

    git push origin master --force

它工作得很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM