Announcing the GitHub Extension for Visual Studio
Today, Steven Guggenheimer announced Microsoft’s collaboration with GitHub and introduced several projects that make it easier for developers on GitHub to work with Visual Studio and Azure. In particular, the GitHub Extension for Visual Studio released today by GitHub lets you clone your existing GitHub repositories, create new repositories, and navigate to important GitHub features like Pull Requests, Issues, and Reports from inside VS. The extension builds on the Git support already in Team Explorer so you get a consistent experience for commits, branching, and conflict resolution no matter what remote repository you set. GitHub’s extension is available as an option in Visual Studio 2015’s setup so developers won’t have to go far to get these new capabilities. In addition, GitHub has made it easier to access Visual Studio from GitHub.com with a new “Open in Visual Studio” button. Let’s take a look at what you can do with the first release of GitHub’s extension.
Getting the GitHub extension
Getting the extension is pretty easy. When you install Visual Studio 2015 RC choose “Custom” installation to pick the optional components you want to install and check the box next to the GitHub Extension for Visual Studio. There are a lot of new choices here you’ll want to explore. If you’re not sure what else to pick you can always add features later by rerunning Visual Studio’s setup from Add or Remove Programs.
If you have already installed RC, don’t worry. You can add the GitHub extension after the fact by searching for GitHub extension on the Visual Studio Gallery from the Extension Manager or installing the MSI on GitHub.
Connecting to GitHub.com and GitHub Enterprise
Once you’re set up, get started by opening Team Explorer and selecting GitHub under the new “Manage Connections” menu.
Sign in with the credentials for your user account on GitHub.com or GitHub Enterprise. A new section is added to the Connect page of Team Explorer where you can get started with a new repository on GitHub or clone your own repositories, private repositories that have been shared with you, and any repositories you can access under organizations where you are member. After a repository is cloned it appears in the local repositories list. Clicking any of these cloned repositories will make it the active repository in Visual Studio and Team Explorer. From here, all the changes, commits, branches, and syncs will happen in this active repository.
Publishing a local repository
The Team Explorer’s Synchronization page also has a new section to help publish a local repository into GitHub.
The most direct way to open the Synchronization page is to first open the local repository then click the Home button in Team Explorer. Follow the Sync nav item on the Home page to load the Synchronization page where you’ll see the new Publish to GitHub section. The new section will walk you through getting signed in to your GitHub.com or GitHub Enterprise account, let you update your repo name and select whether it should be published as a public or private repository. It’s really that easy.
Open in Visual Studio from GitHub.com
After you sign in the GitHub extension from Visual Studio for the first time you’ll begin to see the “Open in Visual Studio” button on any GitHub repository you visit.
Clicking the button will launch Visual Studio and start a clone inside the IDE. The Open in Visual Studio button calls a new protocol handler called “git-client://”. We designed this new generic protocol together with GitHub to allow a website pass standard Git operations to any IDE that’s registered with the OS to handle that protocol. So far we support basic Git clone. For example git-client://clone/?repo=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-quickstart-templates
will launch VS and start a clone operation for Azure Quickstart templates. Multiple clients can register with the OS to handle the git-client:// protocol and the end user can decide which client to direct these requests.
We’re excited the millions of GitHub developers can now have a great experience when they use the world’s best IDE. Phil Haack, engineering manager at GitHub, has a video that will walk you through how to make the most of this extension in Visual Studio. Our team is working closely with GitHub to extend Visual Studio with more capabilities. Tell us what you think by sharing your feedback at firstname.lastname@example.org.
|Anthony Cangialosi Principal PM Manager, Visual Studio IDE
Anthony has focused his career at Microsoft on building developer technologies. He is the program manager for Visual Studio’s Connected experiences and IDE. Anthony joined the Visual Studio team in 2001 and has contributed experiences across the IDE including VS’s identity infrastructure the Shell, the VS SDK, Ecosystem, VSIP, and mobile device development.