2017-08-10 85 views
1

我正在使用TFS。当我加入一个新的文件到项目中去,以提交更改,并试图推动它,是给了一个错误:无法使用TFS推送代码

Error encountered while pushing to the remote repository: Not a valid reference 'origin/mybranchname'

+0

你使用哪个版本的TFS和VS的?它是否有任何其他错误消息?如何使用Git命令行来提交/推送更改,“git commit -m”,首先提交“”git push“,请分享一下详细步骤以重现此问题吗? –

回答

0

请尝试以下项目以解决此问题:

  • 待办事项一个然后一个合并,或做一个,集成 传入提交与您的本地提交,然后尝试推。详细信息请参见this issue

For some reason the Visual Studio extension is misinterpreting the error message from the git command and/or server. The actual problem here is that you have incoming commits that should be fetched and merged with your local commits before pushing. You're not allowed to push multiple tips onto the server.

  • 清洁VS客户端缓存,重启VS,然后再次尝试。
  • 取出Git和重新安装最新版本

    1. 备份和删除"C:\Program Files (x86)\Microsoft Visual Studio 14.0\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git"删除Git的文件夹。
    2. 通过转到控制面板>程序删除Git和特点
    3. 安装最新版本的GIT的:https://git-scm.com/download/win
+0

@Param您是否已通过以上建议解决了此问题?更新? –