2017-08-10 79 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您是否已通過以上建議解決了此問題?更新? –