Sự kiện
21 giờ 17 thg 3 - 10 giờ 21 thg 3
Tham gia chuỗi buổi gặp gỡ để xây dựng các giải pháp AI có thể mở rộng dựa trên các trường hợp sử dụng trong thế giới thực với các nhà phát triển và chuyên gia đồng nghiệp.
Đăng ký ngayTrình duyệt này không còn được hỗ trợ nữa.
Hãy nâng cấp lên Microsoft Edge để tận dụng các tính năng mới nhất, bản cập nhật bảo mật và hỗ trợ kỹ thuật.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Visual Studio 2019 | Visual Studio 2022
Whether your software project is large, small, or brand new, it's best to use version control as early as possible. This article shows you how to get started with Team Foundation Version Control (TFVC), a centralized version control system.
If you want to work in a distributed version control system, you can instead use Git with Azure Repos.
If you have code you want to migrate into Azure DevOps Services, see the Migration overview.
Category | Requirements |
---|---|
Project access | Member of the Azure DevOps project where the TFVC repository is located. |
Permissions | - Read: To view the repository and its contents. - Check In: To check in changes to the repository. - Check Out: To check out files for editing. - Manage Workspaces: To create and manage workspaces. |
Tools | Visual Studio. |
In Visual Studio, from the Home page of Team Explorer, select the Manage Connections icon.
On the Connect page of Team Explorer, right-click the project that contains your repository, and select Connect.
If the project you want isn't listed, select Manage Connections, select Connect to a Project, and then select the project you want. For more information, see Connect from Visual Studio or Team Explorer.
Lưu ý
Some TFVC menu options aren't displayed in Visual Studio until you connect to TFVC.
On the Home page of Visual Studio Team Explorer, select Configure your workspace to map the project to a folder on your dev machine.
Confirm your workspace path, and select Map & Get to map the workspace and get your code.
Now you can check in source, queue builds, and manage work.
If you don't see the Configure your workspace link, you might already have a workspace on your computer. To see existing workspaces, open Source Control Explorer, or look under Solutions in Team Explorer. For more information, see Use Source Control Explorer to manage files in TFVC and Create and work with workspaces.
Lưu ý
TFVC doesn't support workspaces on network drives or UNC paths.
To create a new code project to put under TFVC source control, select New under Solutions in the Home page of Team Explorer. Put the new solution in your mapped workspace folder, such as c:\Users\<YourName>\Source\Workspaces\YourTeamProject\.
Or, if you already have an app in progress that you want to put under TFVC source control, move the solution into your workspace folder in Windows File Explorer.
Open your solution in Visual Studio.
Press Ctrl+Alt+L to open Solution Explorer, and in Solution Explorer, right-click the solution and select Add Solution to Source Control.
In the Add Solution to Source Control dialog box, review the details, and then select OK.
When you're ready to check in your code, right-click your solution in Solution Explorer and select Check In.
On the Pending Changes page of Team Explorer, add a check-in comment and then select Check in.
From the Home page of Team Explorer, select Source Control Explorer.
In Source Control Explorer, you can see the solution in TFVC.
Your whole team can work on the code now. All changes are tracked in version control.
When you edit code in Visual Studio that's under TFVC source control, the changed file is automatically checked out. For example, site.css is checked out after the font-size
has been changed to 16px
.
To compare the modified file with the latest version in source control, right-click the file in Solution Explorer and select Compare.
The Diff window opens, and you can see the difference between the two versions.
In Solution Explorer, right-click the file and select Check In to check in the change.
You can also check in from the code editor or from Team Explorer.
If you're working on a task or fixing a bug that's tracked as a work item, you can associate that work item with your pending changes. TFVC resolves the bug, closes the task, or links the changeset to the work item.
Add a comment and check in.
In Source Control Explorer, right-click the file you changed and select View History to view its history.
The History window lists all the changesets that include this file.
Sự kiện
21 giờ 17 thg 3 - 10 giờ 21 thg 3
Tham gia chuỗi buổi gặp gỡ để xây dựng các giải pháp AI có thể mở rộng dựa trên các trường hợp sử dụng trong thế giới thực với các nhà phát triển và chuyên gia đồng nghiệp.
Đăng ký ngayĐào tạo
Mô-đun
Manage source code by using version control in finance and operations apps - Training
When you're collaborating with other developers, it's important to manage your source code by using version control. For finance and operations apps, source code is managed by using Azure DevOps within Visual Studio.