Microsoft launched Visual studio 2012 which can be integrated with Git (and github), I'm using the following reference linking visual studio 2012 with git, but i'm not getting any option to commit my code. Do i need to install/use Github for windows? Or is it possible to integrate with github directly from visual studio?
In Visual Studio, select Team Explorer from the View menu. In the Team Explorer pane, click the Manage Connections toolbar icon. Click the Connect link in the GitHub section. If none of these options are visible, click Manage Connections and then Connect to GitHub.
To clone a repository you have go to Connect to Team Projects in Team Explorer, and under Local Git Repositories use the Clone pane to enter the URL of the server repository and the local destination. After the repository has been cloned, it shows up in the list, as shown below.
First of all, install Visual Studio 2012 Update 3 and the Visual Studio Tools for Git to enable Git support in 2012. And you must ensure that Git for Windows is installed (Visual Studio will prompt you to install it if you haven't done so).
If you're using Visual Studio 2013 or later, Git support is built in and doesn't require any plugin installation.
Then, under Source Control, ensure that you have the "Microsoft Git Provider" enabled:
Open the Team Explorer tab. When you click the connect button in the toolbar (looks like a power plug), make sure your repository is listed under Local Git Repositories, or use the clone option to clone a repository to your system.
When you click clone you can enter an existing GitHub repository location, use the "HTTPS" location of your repository. Visual Studio doesn't support SSH. You can use the location picker on your GtiHub repository page to get the right clone url.
Then finally, on the Unsynced Commits
tab you can click Sync to synchronize your local repository with the remote, this will ask for your GitHub credentials.
If you want to create a new repository from scratch, I have not the slightest idea of how to do that from the UI, but after creating an empty repository on GitHub, you should be able to add a new remote from the commandline. Visual Studio will then pick up that remote and allow you to push into it.
See the following steps on github to initialize an empty repository and setup the link between your local repository and github. Once you've done that, the repository should show up in Visual Studio as well (if it doesn't, add it using the add option on the connect page of Team Explorer).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With