If you have a network connection to your server while you're working outside of Visual Studio, it's probably best to go ahead and check the file out before editing it, either using the tf command line client, or using the Windows Explorer shell integration that's available in the TFS Power Tools release. (Plus an increasing number of other tools have TFS integration that makes this automatic, but if you're just using notepad, this still needs to be a manual step.)
当然,有很多时候您正在工作,但是没有可用的网络连接来检出文件。
If you know what files you've modified, you can just check them out from within Visual Studio, then you'll be able to check them back in.
如果您不知道编辑了哪些文件,可以通过运行 tfpt online命令(也是 Power Tools 版本的一部分)来检测更改。这将定位在本地修改过的文件,并从服务器检出这些文件。
*1- make changes outside of Visual Studio
2- go to Visual Studio and open Source Control Explorer
3- right click on the folder > "Check Out for Edit" > "Check Out"
4- right click on the same folder > "Undo Pending Changes..." > "Undo changes" > "No to All"*
过去我遇到过这个问题,当我的 Internet 关闭并且我离线工作时,我的大部分更改都不会出现在团队浏览器中。
以下步骤:
First, In the solution explorer, select the folder that you want to re-conciliate (for me, it was my entire solution folder), and select 比较一下..。
单击 修改过滤器,在 过滤器文本框中,您可以键入:
*.cs;!obj\;!bin\;!packages\;
在这个例子中,它将在搜索中只包含 C # 文件,并排除在文件夹中: bin,obj 和包。
请注意,列 等待改变的信息是否文件被标记为编辑,添加等... 或没有..。
若要将其标记为 edit(当本地项具有匹配的服务器项时) ,请选择该文件并选择 看看编辑..。
若要标记为 加(当本地项目没有任何服务器项目时) ,请选择文件并选择 添加文件
Finally, I am not sure why the projects are not listed here (after I remove *.cs filter, still doesn't show up), so rebuild the solution to make sure the projects updates as well
+ In the solution, click the connect button (if shows up) that said 上网.