Tfs why use workspaces
By using workspaces to remember files and versions downloaded TFS can use this information to massively optimize the network traffic between your computer and the TFS server. This is one of the design decisions that the team at Microsoft took to optimized for distributed teams working over wide area networks. The TFS workspaces is therefore a central piece in ensuring two of the key principles in the way TFS Version Control behaves:- Only send the information between server and client that you need to send Only do this when I tell you to.
However, to get the benefit of this reduced network traffic, you have one very important price to pay. Talk to TFS when you do something to a file or folder that is in version control.
TFS does some neat tricks with workspaces to keep them up-to-date. Any versions of files that you do not yet have are downloaded and placed into the directories you told it to put them in when you created a working folder mapping. Those files are then marked as read-only in the local file system. To edit a file, you must check the file out. When you have finished editing, you check-in the file. Before the code is committed to the server, the server looks at what version you had locally by looking in your workspace and compares this with the latest version on the server.
Once you get to the position that you have no conflicts in the list of pending changes that you wish to commit, you can then check-in your code and it will get committed to the source code repository as a new changeset. The server also updates its record of your workspace to say that you already have this new version of the file locally. In summary, TFS workspaces are the way in which the server can keep track of which versions of what files you have on a given machine, where you have them on that machine and what changes you are in the process of making.
Hopefully, you can start to see some implications of the way in which TFS workspaces are used by the server. In that scenario you would want to use the "Get Specific But you need to understand the concept thoroughly. Many developers don't understand exactly what workspaces are and how they work, they're missing out of some of the most powerful concepts of TFVC. Remember that workspaces are stored on your local machine, but that the TFS server also has a registry of who mapped which TFVC folders to which workstations.
So simply deleting files from your local disk is not sufficient. You need to save these changes to the TFS server this happens automatically after performing a get operation after changing the mappings. A lot of people configure a new workspace for a specific project or set of solutions, but let's look at some of the ways workspaces can be used in detail: Hotfixes: you may need to create a hotfix for something happening now, but you have pending changes in your existing workspace.
Instead of shelving these changes, performing a "Get Specific version" on the bugged version, you can also create a new workspace in which to solve this particular problem. After completing the fix you can then continue working with the other workspace without needing to do anything.
Experiments: you may want to do some major refactoring, restructure source control or some other highly impactful operation. Your workspace is your local copy of the team's codebase. Choose Public workspace if you want to use a single computer for a team to collaborate on an effort such as resolving a large number of conflicts, so you can't use this workspace on other computers.
You can only view all the workspaces you own including those on other computers in VS. Stop managing code on a shared drive. Shared drives are what you use if you don't have source control.
You have source control; use it. People can map a workspace on their machines and get the source code from source control. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.
Learn more. Asked 1 year, 7 months ago. Active 1 year, 7 months ago. Viewed times. Can this be done?
0コメント