Tuesday, July 9, 2013

Using a local source repo to work on vs2008 projects in vs2012

If the project type can't be opened or worked in the newer Visual Studio then you are still out of luck, but otherwise here we go. Assuming you have Git installed, go to the top level of a directory that would include both your .sln and .proj files.
$ git init
inside that directory then if you don't have a default set of ignores. you will want to set that up. Before opening Visual Studio, do your initial commit.
$ git checkout -b Vs2012
to create the new branch. Open in Visual Studio 2012. Commit the changes. Now you can make all your edits and commit them. When you want to pull the changes to the old VS branch change to that branch and do a git-cherry-pick
$ git cherry-pick SHA
replace SHA with the SHA hash of the commit you want to pick. Or to do them in bulk...
$ git cherry-pick SHA1..SHA2
replace SHA1 with the SHA hash of the commit you want to skip, and SHA2 with the last one you want.

No comments:

Post a Comment