简体   繁体   English

无法在Visual Studio 2013中重新绑定TFS解决方案

[英]Cannot rebind TFS Solution in Visual Studio 2013

I noted that some files in my solution explorer are not in source control as they do not have a padlock icon. 我注意到,解决方案资源管理器中的某些文件没有源代码控制,因为它们没有挂锁图标。 I tried to rebind the solution as suggested here but I do not have a Source Control menu item under file. 我试图按照此处的建议重新绑定解决方案,但文件下没有Source Control菜单项。 文件菜单中没有源代码管理选项

It seems you are using Git as your source control. 看来您正在使用Git作为源代码控件。 There is no Source Control menu item under File for Git. Git的文件下没有Source Control菜单项。 It's a normal phenomenon. 这是正常现象。 This menu item is only for TFVC . 该菜单项仅适用于TFVC

No matter your folder(Solution items) are adding in source control or not, there is no padlock icon in front of it. 无论您的文件夹(解决方案项目)是否添加到源代码管理中,它前面都没有挂锁图标。 It's by designed. 这是设计使然。 Normally, if you can see it in Solution Explorer, means it has been added in source control. 通常,如果您在解决方案资源管理器中可以看到它,则意味着它已添加到源代码管理中。 You can double check it through your Web Portal (Code→Git→Your solution) 您可以通过Web门户再次检查它(代码→Git→您的解决方案) 在此处输入图片说明

If you can't see it , you want to add it in source control. 如果看不到它,则要将其添加到源代码管理中。 Right click your solution in Solution Explorer, select source control, select commit, then commit and push. 在解决方案资源管理器中右键单击您的解决方案,选择源代码管理,选择提交,然后提交并推送。 Or use git command, $ git add . /$ git commit -m "First commit"/ $ git push origin master 或使用git命令, $ git add . /$ git commit -m "First commit"/ $ git push origin master $ git add . /$ git commit -m "First commit"/ $ git push origin master

如果您使用TFVC作为源代码控件,则可以从Tools-> Options 启用/禁用插件选择 ,尽管我怀疑Patrick对Git的假设是正确的。

I was indeed using Git but even right-clicking on my solution did not provide me with the source control option (as @Patrick suggested). 我确实在使用Git,但是即使在解决方案上单击鼠标右键也没有为我提供源代码管理选项(如@Patrick建议)。 Eventually I noted that in Team explorer > Changes there was a section containing Untracked Files. 最终,我注意到在“团队资源管理器”>“更改”中有一个部分包含“未跟踪的文件”。 I clicked Add all, and these files started being tracked, thus solving my problem. 我单击全部添加,然后开始跟踪这些文件,从而解决了我的问题。

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

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