Monday, July 1, 2013

Setting up VS2012, Git, and CodePlex

I figured that even though I found the process to be fairly straight forward, someone out there would benefit from a step by step about it.

  1. First things first: install Git. This is probably the step that some of my coworkers would cringe at. While CodePlex apparently has extensions for use with Mercurial, the set up page mentions that the Mercurial stuff doesn't work as well. I didn't try it personally (even though I'm more of a Mercurial guy), so this post won't cover it. This Google Code project has great installation instructions for TortoiseGit: https://code.google.com/p/tortoisegit/
  2. Next, Microsoft has made a handy Git plugin for VS2012, available here: http://visualstudiogallery.msdn.microsoft.com/abafc7d6-dcaa-40f4-8a5e-d6724bdb980c. This enables access to a Git repository from directly within VS, something that I found handy while using Eclipse and Mercurial. The plugin is fairly straightforward, neat and clean looking, so I'd have to recommend it.
  3. Go to your CodePlex project's source code tab. This assumes you've already made a project, but if you haven't it's not that hard (and it's free!) so go do it already! Click the Clone button and you should get a pop up similar to the following (taken from the CodePlex Git setup site available here, conveniently the same address I pulled the following picture from). Copy the address they conveniently highlight for you, you'll need it later.
  4. Open up Visual Studio and load whatever solution you want to add to CodePlex repository. If you haven't created the project or solution yet, or if there's something else you want to do, this page will probably be helpful. Right click on the project in the Solution Explorer.
  5. Select "Add Solution to Source Control..." and then select Git.
  6. Once this is set up, click the commits button for the repository. The first time you do this, VS will ask for an address for your repository. This is where you paste in the address that CodePlex gives you in Step 3. (Picture linked from http://blogs.msdn.com/b/visualstudioalm/archive/2013/02/06/set-up-connect-and-publish-using-visual-studio-with-git.aspx)


And that's it! You should be off and coding in no time. Once you commit, and push, the changes should go directly into your CodePlex repository and you should be able to see them in CodePlex's source browser. I hope you found this helpful, feel free to leave questions/comments below. Happy coding!

2 comments:

  1. Cool blog, Tom. It's too bad you can't use Hg for this, but at least Git is much more similar to it than, say, CVS or SVN. Oh, and good luck with your project! It sounds really interesting and I look forward to seeing your progress over the next 6 months!

    ReplyDelete
    Replies
    1. Thanks, Joe! I could have used Hg, but CodePlex warns against it and there's no handy plugin for VS.... I'm still pretty psyched and am beginning to think a lot about the elements that I want to include. I'm coming up on the first sprint (no set deadline yet, but I have most of what I need together and a lot of research under my belt) so I should be relatively steady with posts. I hope this helps someone!

      Delete