使用Git推送到Github时出错

使用Git推送到Github时出错,git,github,git-gui,Git,Github,Git Gui,所以我的文件被上传到git GUI上。按commit可以很好地工作。点击按钮,它会询问我的目标存储库,所以我先输入,然后按enter,然后它会询问我的用户名和密码。输入这些项目后,我收到此错误消息 Pushing to https://github.com/myusername/reposistoryname To https://github.com/myusername/reposistoryname ! [rejected] master -> master (fetc

所以我的文件被上传到git GUI上。按commit可以很好地工作。点击按钮,它会询问我的目标存储库,所以我先输入,然后按enter,然后它会询问我的用户名和密码。输入这些项目后,我收到此错误消息

Pushing to https://github.com/myusername/reposistoryname
To https://github.com/myusername/reposistoryname
! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/emaoll/pnz'
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.

我在github上有一个github帐户和一个存储库。

你已经写好了。。。提交更改,然后提取数据。成功拉取后,您可以再次推送数据。

您需要将更改集成到远程分支中(就像消息所说的那样),如果您想要带来更改并查看它,您必须使用

git fetch origin //Bring all the changes from the remote server
但是,如果要推动本地更改,则必须使用

git pull //Fetch down new data  from remote server
之后,您可以正常使用“gitpush”命令。其实你也可以用

git status //This command bring to you some help, about what's next.
我向您推荐,使用(编写那些命令)gitbash(命令行),-对我来说-更简单。或者,如果需要,使用Git GUI,只需进入远程菜单>获取


问候

它告诉你应该做什么!