Just right-click the repository you want to work and then choose Open or another command. From here you can see and manage all the version control repositories you care about. The Connect page is a new feature in Visual Studio 2012 Update 2.
This error occurs when you try to publish a local repository that does not yet have any commits. You can publish your branch to a remote repository hosted on a third-party service such as CodePlex, GitHub, or Bitbucket.ĭid you get the “Branch master does not exist” error? Click here. You can publish your code into Team Foundation Service. When you are ready to begin sharing some code on your dev machine with others, you publish the branch to the remote repository. Whether you are new to a team project or just setting up a new dev machine, to get working in a Git team project, clone it to your dev machine.Ĭlone a third-party Git repository to your dev machineĭoes your team have some code in GitHub or another service such as CodePlex or Bitbucket? You can clone the code down to your dev machine and get working in Visual Studio. Clone a TFS Git repository to your dev machine To begin collaborating with others on code in a remote repository, you clone it to your dev machine. You can use Visual Studio to work with it. Clone a remote Git repository to your dev machineĭoesn’t matter where your Git repository is hosted: TFS, CodePlex, GitHub, Bitbucket, or somewhere else. We’ll talk more about common scenarios for using these tools in a future post. If you don’t already have command-line tools installed, you can install some: You can add a single repo at a time, or, as we show below, point Visual Studio at a directory that contains multiple repositories and add them all in one shot.Īfter you add the repository, you can open it and get to work in Visual Studio.īTW, notice that nifty “Open in Command Prompt” command? Eventually you will likely need it to perform some tasks. Regardless of whether the local repo has a remote or not, you can add it and then work with it in Visual Studio. Maybe you’ve got other repositories you’ve been using with other client tools. Now that your repository is created, go ahead and commit your files. If you’ve already got a solution in which you’ve been tinkering on your local dev machine, before you tinker any further, why not go ahead and add it to a lightweight local Git version control repository? Put an existing solution under local Git version control We cover this angle from start to finish in our Welcome Portal tutorial. Whenever you create a new code project, you can put it under local Git version control. Create a new solution under local Git version control When you are ready, you can publish and share it with your team. Your new local Git repository is now ready for you to use. (We’ll talk more about these and other Git settings in a future post). gitignore files that Visual Studio created for you. This will set the repo as the active repo in Team Explorer. Go to the Connect page and create the new repository. In Visual Studio you can do this in a few seconds. You just want to create an empty local repository. Visual Studio provides a few convenient ways to create a local repository: One of the key advantages of Git is your ability to do more things locally. Clone a third-party Git repository to your dev machine.Clone a TFS Git repository to your dev machine.Clone a remote Git repository to your dev machine.Put an existing solution under local Git version control.Create a new solution under local Git version control.
In this post we will demonstrate Visual Studio’s flexibility to help you get your work done in the places you need to do it: locally, on TFS, or on a third-party service such as those Brian mentions above. This is not about lock in – it’s about providing a good and interoperable Git capability. And TFS will work with pretty much any Git client – existing Git command lines, XCode, Eclipse’s Git support, …. Our client will work with pretty much any Git repository – local, enterprise, Codeplex, GitHub, BitBucket, …. Both client and server are standard implementations of Git.