TFS 映射与 Subversion
我是 TFS 的新手,我主要使用 Subversion。我对“映射”的概念感到困惑。看起来 TFS 将本地文件夹映射到源代码管理文件夹。因此,我“自动”所做的每个本地更改都会添加到源代码管理中???
我只问b/c我得到了使用Visual Studio 2005构建的项目的最新版本,并且我有Visual Studio 2010。所以当然我必须在我的“本地”文件夹中转换它,但源文件夹已经“看到”我已经做出了改变。我尝试撤消挂起的更改,但源代码管理中的解决方案仍然显示 VS2010 图标。希望当我什至没有提交任何更改时,我没有将其他人的解决方案更改为 VS2010。
有没有办法撤销任何更改?
I am new to TFS, I have been mainly using Subversion. I am confused with the "mapping" concept. It looks like TFS maps a local folder to a source controlled folder. So every local change I make "automatically" gets added to source control???
I only ask b/c I am got the latest version of a project that was built using Visual Studio 2005, and I have Visual Studio 2010. So of course I have to convert it on my "local" folder, but the source folder already "sees" that I have made that change. I tried to undo pending changes, but the solution in source control still shows the VS2010 icon. Hopefully I did not change the solution for everyone else to VS2010 when I didn't even commit any changes.
Is there a way to back out any changes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没问题,从 VSS、Subversion 或任何其他工具习惯 TFS 可能会很棘手。
正如您所猜测的,映射允许您将源文件夹映射到本地文件夹。
它的工作方式不太一样。TFS 只会控制您已明确添加到源代码管理的文件。因此,例如,如果您在 TFS 中映射的文件夹内添加 50 个文件,您将如果您愿意,您可以添加它们,
但即使 TFS 拾取文件,它也会在将其添加到源代码管理之前询问您(例如网站)。将检测到新文件并询问您是否要添加 该图标的
显示方式取决于您本地安装的工具以及将 sln 与 VS 版本关联的方式,如果您没有通过检查签入 sln 的升级版本,请不要担心。升级向导然后将其检查到 TFS 中,您在这里没有问题。
No problem yeah getting used to TFS from VSS, Subversion or any other tool can be tricky.
Mapping allows you to, as you guessed, map a sourced folder to a local folder.
It doesn't work quite like that. TFS will only control files that you have explicitly added to source control. So, for instance, if you add 50 files inside of a folder you have mapped in TFS, you will not have those automatically added in Source control. You can though add them in if you want.
There are some exceptions to this though but even when TFS picks up a file it will ask you before adding it to source control (example being websites- it will detect a new file and ask if you want to add to source control).
How that icon shows is based on your locally installed tools and how you associate the sln to your VS version. Don't worry about that icon. If you didn't checkin an upgraded version of the sln by going through the upgrade wizard then checking that into TFS you don't have a problem here.
映射只是确定哪个本地文件夹对应于服务器文件夹。
使用 TFS,不会自动将任何内容添加到源代码管理中。如果您想将文件添加到源代码管理中,您仍然需要挂起对该文件的更改。也就是说,当您使用 Visual Studio 时,更改会自动挂起 - 当您添加文件时,它将挂起以添加到服务器,当您打开文件并开始编辑时,它将挂起以进行编辑,等等。这与 Subversion 的不同之处在于,您在进行更改时而不是在提交时通知。
一旦文件有待更改的更改,该更改仍然只存在于本地。您可以在“待定更改”视图中查看已暂定的更改,该视图位于“视图”>“待定更改”下。待定更改。当您想要提交到服务器时,可以从此视图中选择“签入”。
如果您想检查是否已签入某些内容,可以打开源代码管理资源管理器,导航到该文件,右键单击并选择查看历史记录。您可以通过选择历史记录中的版本并选择“获取此版本”,以这种方式检索以前的更改。如果您想回滚,则可以重新签入该版本,使其成为最新版本。
A mapping simply determines what local folder corresponds to a server folder.
With TFS, nothing automatically gets added to source control. If you want to add a file to source control you still need to pend a change for the file. That said, when you're using Visual Studio, changes are pended automatically - when you add a file, it will be pended for addition to the server, when you open a file and start editing, it will be pended for edit, etc. This differs from Subversion in that you notify when you make changes instead of at commit time.
Once a file has had a change pended, this change still only exists locally. You can view the changes that you have pended in the Pending Changes view, available under View > Pending Changes. When you want to commit to the server, you can select Check In from this view.
If you wanted to check to see if something had been checked in, you can open up the Source Control Explorer, navigate to that file, right-click and select View History. You can retrieve previous changes this way, by selecting a version in history and selecting "Get This Version". If you wanted to roll back, you could then check this version back in, making it the latest version.