简体   繁体   English

如何查看表单代码历史记录?

[英]How do I view form code history?

I'm working on a C# desktop application for a class, using Visual Studio Online source control system. 我正在使用Visual Studio Online源代码控制系统在一个类的C#桌面应用程序上工作。 It gave me a choice of Team Foundational Server or Git, and I choose Git because I've heard of it and my professor recommends it. 它为我提供了Team Foundational Server或Git的选择,而我选择Git是因为我听说过它,而我的教授推荐了它。 This is my first time using these features and I'm finding them a little confusing. 这是我第一次使用这些功能,但发现它们有些混乱。

I can view the history of most of the files I'm working with, and revert to old versions, but I can't seem to do that for my form code. 我可以查看正在使用的大多数文件的历史记录,并恢复为旧版本,但是我似乎无法为表单代码执行此操作。 I think it has to do with what files are attached to source control, indicated by the blue lock icons. 我认为这与附加到源代码管理的文件有关,蓝色锁定图标表示该文件。

Here's a screenshot of what I'm talking about: 这是我正在谈论的屏幕截图:

http://i.stack.imgur.com/oqkvB.png

I would like to be able to see the history of Production Buddy.cs, what am I doing wrong here? 我希望能够看到Production Buddy.cs的历史,我在这里做错了什么? I can see Production Buddy.Designer.cs's history, so I may be not fully understanding what's going on here. 我可以看到Production Buddy.Designer.cs的历史,所以我可能没有完全了解这里的情况。

Thanks! 谢谢!

The screenshot shows there was neither red tick or blue tick. 屏幕截图显示没有红色刻度或蓝色刻度。 Which indicates that the file was not under source control. 这表明该文件不受源代码控制。 This happened may be because you copy pasted the file or the solution was on offline mode or solution file was updated when you took latest which replaced the entry of Production Buddy.cs file, and since it was not on the server there was no server history for that file. 发生这种情况的原因可能是因为您复制粘贴了该文件,或者解决方案处于脱机模式,或者解决方案文件在进行最新更新时已更新,从而替换了Production Buddy.cs文件的条目,并且由于该文件不在服务器上,所以没有服务器历史记录该文件。

I would recommend using Source Control Explorer when you have to compare the files. 当您必须比较文件时,我建议使用Source Control Explorer

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

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