简体   繁体   English

搁置然后撤消挂起的更改

[英]Shelving and then Undo pending changes

I'm new at TFS in Visual Studio and I want to understand something about Shelve and Undo . 我是Visual Studio中的TFS新手,我想了解一下ShelveUndo
Let guess I checked out some files, made some changes and then shelved them. 我猜我检查了一些文件,做了一些修改然后把它们搁置了。
In that moment - the source code which was before I made changes is restore to original code so all the team members won't see my changes? 在那一刻 - 我做出更改之前的源代码还原为原始代码,因此所有团队成员都不会看到我的更改?
-- or -- - 要么 -
they see the modified code until I Undo pending changes? 他们看到修改过的代码,直到我撤消挂起的更改?
And if I undo the changes - will it affect my shelvset? 如果我撤消更改 - 它会影响我的shelvset吗?

So you need to understand what is actually happening. 所以你需要了解实际发生的事情。 When you make changes, they only exists on your machine until you check them in to the repository. 进行更改时,它们仅存在于您的计算机上,直到您将其签入存储库。 A shelveset provides a "safe" place for you to store your changes before you check them in. 搁置集提供了一个“安全”的位置,您可以在签入之前存储更改。

The rest of the team won't see your changes until you check them in to the repository. 在您将其更改到存储库之前,团队的其他成员将不会看到您的更改。 So when you undo changes it is merely the changes that you made to your code that is on your machine. 因此,当您撤消更改时,它只是对计算机上代码所做的更改。

In your example above, your team won't see any changes until you actually check it in. 在上面的示例中,您的团队在实际检查之前不会看到任何更改。

Changes in Shelvesets can be seen by the other team members, but they are not committed to the repository. 其他团队成员可以看到Shelvesets中的更改,但它们未提交到存储库。 They would have to go to Pending Changes -> Actions -> Find Shelveset and type you name in the user search box. 他们必须转到Pending Changes - > Actions - > Find Shelveset并在用户搜索框中输入您的姓名。

Only when you do a check-in, will others see your changes in the repository. 只有在您办理登机手续时,其他人才会在存储库中看到您的更改。

Undo will remove the changes locally, but the shelveset will remain so that you or anyone on the team can get the changes back locally. 撤消将在本地删除更改,但搁置集将保留,以便您或团队中的任何人可以在本地获取更改。

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

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