我有一个项目,我开始在视觉工作室工作,我想把它推给吉特布。我是新来的。到目前为止,我已经在VS中添加了Github扩展,并创建了一个文件夹来将其存储在Github上。我已经在VS上注册了我的github,并且它与正确的项目有关联。
问题是,当我尝试同步项目时,我遵循了以下链接:https://github.com/github/VisualStudio/blob/master/docs/using/publishing-an-existing-project-to-github.md
但是我无法将我的VS项目同步到我的Github。我收到的错误消息是:
Error encountered while pushing branch to the remote repository: rejected Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes before pushing again.
Pushing master
Error: failed to push some refs to 'https://github.com/ProjectExample/Main'
Error: hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error encountered while pushing branch to the remote repository: rejected Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes before pushing again.现在我尝试获取VS,但这似乎没有什么区别,除了README.md之外,github上的项目是一个空文件夹
对不起,如果这似乎是基本的或没有很好地解释,我仍然在学习如何使用与VS,但我会尽我最大的努力澄清任何问题。我不知道下一步该做什么或解决这个问题,任何评论都将不胜感激,谢谢大家的意见。
发布于 2019-08-04 11:22:27
这是因为您已经创建了一个非空的GitHub存储库。
再试一次,这次是空的(没有自述文件,没有许可证文件.)最初的推动应该运作得很好。
或者,拉应该将远程master分支(及其README文件)合并到您的代码中,然后您可以推送。
https://stackoverflow.com/questions/57346062
复制相似问题