Events
17 Mar, 23 - 21 Mar, 23
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Visual Studio 2019 | Visual Studio 2022
Whether your software project is large or small, using version control as soon as possible is a good idea. Version control systems consist of software that helps you track changes you make in your code over time. As you edit your code, you tell the version control system to take a snapshot of your files. The version control system saves that snapshot permanently so you can recall it later if you need it.
Azure DevOps Services and TFS provide two models of version control: Git, which is distributed version control, and Team Foundation Version Control (TFVC), which is centralized version control. This article provides an overview and a starting point for using TFVC. If you're deciding which type of Azure DevOps Services/TFS version control to use, see Choosing the right version control for your project.
Without version control, you're tempted to keep multiple copies of code on your computer. This is dangerous, because it's easy to change or delete a file in the wrong copy of code, potentially losing work. Version control systems solve this problem by managing all versions of your code but presenting you with a single version at a time.
Version control systems provide the following benefits:
There are plenty of things that can take up your time as a developer: reproducing bugs, learning new tools, and adding new features or content. As the demands of your users scale up, version control helps your team work together and ship on time.
TFVC is a centralized version control system. Typically, team members have only one version of each file on their development machines. Historical data is maintained only on the server. Branches are path-based and created on the server.
TFVC lets you apply granular permissions and restrict access down to a file level. Because your team checks all its work into Azure DevOps Server, you can easily audit changes and identify which user checked in a changeset. By using compare and annotate, you can identify the exact changes that they made.
Get started by creating a project, configuring your workspace, and reviewing and sharing your code. You can use any one of these clients or IDEs:
Learn the basics of working in TFVC with the following tutorial, which shows a day in the life of a DevOps developer using Visual Studio and TFVC.
Set up your development machine and get started
Spend a few minutes to set up your development machine to take advantage of all the benefits of a version-controlled codebase.
Choose your workflow model - server or local workspaces
Server workspaces - Before making changes, team members publicly check out files. Most operations require developers to be connected to the server. This system facilitates locking workflows. Other systems that work this way include Visual Source Safe, Perforce, and CVS. With server workspaces, you can scale up to very large codebases with millions of files per branch and large binary files.
Local workspaces - Each team member takes a copy of the latest version of the codebase with them and works offline as needed. Developers check in their changes and resolve conflicts as necessary. Another system that works this way is Subversion.
Develop your app in a version-controlled codebase
You don't have to think about version control in most situations. The system supports you when you need to manage and understand your changes.
Sometimes you need to set aside some or all of the work you are doing. Your version control system can take away some of the pain and reduce the time wasted by interruptions.
Contribute your work to the team
Check in your changes so your team can build upon, test, and release the value you've created.
Use branches and locks to isolate risk introduced by work done by different teams.
One advantage of a version control system is that you can look back in time to get detailed information about what changes have been made to your files.
You can compare server folders and local folders to each other, and view the differences between the contents of each folder.
Resolve Team Foundation Version Control conflicts
A big advantage of using version control is that several people can work concurrently on a file. One drawback is that sometimes you must resolve conflicts. Although it can be frustrating to encounter conflicts, the system provides information and tools to help you understand and resolve conflicts.
Work with version control locks
When you need to prevent a file or folder from being checked out and altered, you can lock it.
The following table lists tasks for TFVC that you can perform only at a command prompt by using the tf
command line tool.
Task | Command |
---|---|
Delete another user's workspace. | workspace with the /delete option |
Undo another user's check-out. | undo |
Remove another user's lock. | lock |
Define label scope. | label |
Perform a baseless merge. | merge |
Permanently destroy content. | destroy |
Roll back the effect of one or more changesets. | rollback |
Events
17 Mar, 23 - 21 Mar, 23
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now