title | description | ms.assetid | toc | ms.prod | ms.technology | ms.manager | ms.author | author | ms.topic | ms.date | monikerRange |
---|---|---|---|---|---|---|---|---|---|---|---|
Develop and share your code in TFVC using Visual Studio | VSTS |
Share code in Team Foundation Version Control using Visual Studio |
108544c0-c29e-4b3b-9a39-4573cf4a71dc |
show |
devops |
devops-code-tfvc |
douge |
sdanie |
steved0x |
quickstart |
08/10/2016 |
>= tfs-2015 |
Whether your software project is large, small, or brand new, in most cases you'll be better off if you use version control as early as possible. Here, we'll show you how to get started with Team Foundation Version Control (TFVC), a centralized system. If you want to work in a distributed system, you can instead use Git with VSTS.
Is your code in another place? Learn how to migrate it here.
[!INCLUDE open-team-project-in-vs]
-
In Visual Studio, configure your workspace.
I don't see the Configure Workspace link. What do I do next?
-
Confirm your workspace path, map your workspace, and get the source.
-
Now you can check in source, queue builds, and manage work.
If you already have an app that you want to add to version control, skip down to Add an existing app.
Now that you've added your app, you can skip down to snapshot your code.
-
Close the solution.
-
Open the workspace folder that you created when you configured your workspace.
- Move the code you want to upload to the workspace folder.
- Open your solution in Visual Studio.
-
Open the solution explorer (Keyboard: Ctrl + Alt + L).
-
Add your solution to version control.
- Check in the solution.
- Add a comment and check in.
- Open the source control explorer.
Your solution is now in TFS.
Your whole team can work on the code now. All your changes are tracked in version control.
- When you edit code in Visual Studio, the changed file is automatically checked out. For example, Site.css is checked out after the border color has been changed to #ddd.
- Compare the modified file with the latest version in source control.
You can see the difference between the two versions.
- Check in the changes.
You can also check in from the code window, or the team explorer.
- If you're working on a task or fixing a bug that's tracked as a work item, add that work item to your pending changes. Source control will resolve the bug or close the task, and it'll link the changeset to the work item.
- Add a comment and check in.
- Open the source control explorer.
- View the history of the file you changed.
All the changesets that include this file are listed.
- My code is somewhere else. Can I migrate it to my TFVC project on VSTS?
- I don't see the Configure Workspace link shown in the steps above. What do I do next?
Yes:
You might already have a workspace on your computer. To see your workspace, open Source Control Explorer. Or change your workspace. Find out how to manage files under source control or manage workspaces.
[!div class="nextstepaction"] Get your code reviewed