<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicio.us/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Derik Whittaker : GitHub</title><link>http://devlicio.us/blogs/derik_whittaker/archive/tags/GitHub/default.aspx</link><description>Tags: GitHub</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Moving a TFS Git Repository to Github</title><link>http://devlicio.us/blogs/derik_whittaker/archive/2013/04/09/moving-a-tfs-git-repository-to-github.aspx</link><pubDate>Tue, 09 Apr 2013 11:16:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:109235</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/rsscomments.aspx?PostID=109235</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/commentapi.aspx?PostID=109235</wfw:comment><comments>http://devlicio.us/blogs/derik_whittaker/archive/2013/04/09/moving-a-tfs-git-repository-to-github.aspx#comments</comments><description>&lt;p&gt;We gave using the git support in TFS the old college try but the friction and issues were just too much so we decided to move our repository over to github.&amp;nbsp; I am not going to go over our issues w/ TFS git here, but I am thinking of creating a separate post for it.&lt;/p&gt;
&lt;p&gt;Because we already had our repository w/ change history setup all we really wanted to do was &amp;lsquo;change remote origin&amp;rsquo; for our repository and here are the steps WE took to accomplish this.&lt;/p&gt;
&lt;p&gt;Our Steps (it is assume you already have a github account setup)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to github.com and create your repository.&lt;/li&gt;
&lt;li&gt; Create a copy of your existing tfs/git source and move it to a new directly.&amp;nbsp; I do this simply to ensure I don&amp;rsquo;t screw anything up and have to do a new pull (i am lazy and xcopy is faster).&amp;nbsp; &lt;ol&gt;
&lt;li&gt;from c:\TFSRepo &amp;ndash;&amp;gt; c:\GithubRepo&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Open a git command prompt and CD into the destination directory from step 1&lt;/li&gt;
&lt;li&gt;From the command prompt run &amp;lsquo;git remote &amp;ndash;v&amp;rsquo;&amp;nbsp; this command is a sanity check to double check the current origin of your repository&lt;/li&gt;
&lt;li&gt;From the command prompt run &amp;lsquo;git remote rm origin&amp;rsquo; this command will remove/clear the origin settings for your reporsitory&lt;/li&gt;
&lt;li&gt;From the command prompt run &amp;lsquo;git remote add origin &lt;a href="https://github.com/[AccountUserNameHere]/[RepoNameHere].git&amp;rsquo;"&gt;https://github.com/[AccountUserNameHere]/[RepoNameHere].git&amp;rsquo;&lt;/a&gt; this command will set the origin information to your new repository path in github.&amp;nbsp; Pay attention to the url&amp;rsquo;s casing as github is case sensitive and you may experience issues if the casing is off.&amp;nbsp; &lt;ol&gt;
&lt;li&gt;PS. You can get the url above from the github repository page&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;From the command prompt run &amp;lsquo;git push origin master&amp;rsquo; this command will push your current files up to github and publish them.&amp;nbsp; Please note that this will ONLY push the master branch.&amp;nbsp; If you want to push other branches you will need to do a &amp;lsquo;git push origin [branchnamehere]&amp;rsquo; for each branch.&lt;/li&gt;
&lt;li&gt;Refresh the github.com project page and rejoice in the fact that you are out of TFS and your pain should be greatly reduced :)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These are the steps that worked for us, of course they may be different or better ways, but again these worked for us.&lt;/p&gt;
&lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=109235" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/GitHub/default.aspx">GitHub</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Git/default.aspx">Git</category></item><item><title>How we handled our branches during our TFS to Git migration</title><link>http://devlicio.us/blogs/derik_whittaker/archive/2012/11/10/how-we-handled-our-branches-during-our-tfs-to-git-migration.aspx</link><pubDate>Sat, 10 Nov 2012 18:02:03 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70461</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/rsscomments.aspx?PostID=70461</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/commentapi.aspx?PostID=70461</wfw:comment><comments>http://devlicio.us/blogs/derik_whittaker/archive/2012/11/10/how-we-handled-our-branches-during-our-tfs-to-git-migration.aspx#comments</comments><description>&lt;p&gt;In my &lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2012/11/07/moving-from-tfs-to-github-what-we-did.aspx"&gt;prior post&lt;/a&gt; I documented the steps and processes that OUR team took to move from hosting our source in a TFS solution to Git/Github (remember, these are SIMPLY our steps).&amp;#160; However, one thing I did not mention is how we moved our feature branches from TFS to Github.&lt;/p&gt;  &lt;p&gt;Given the fact that TFS and GIT treat branches treated 100% differently at the lowest level, we knew we would NOT be able to clone/convert our features branches in any reasonable manor and push those into Git. However, these branches were still active and did need to get them out of TFS and into Git.&lt;/p&gt;  &lt;p&gt;So how did we migrate/push our feature branches from TFS to Git?&amp;#160; Simply xCopy :)&lt;/p&gt;  &lt;p&gt;What we did was the following&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Did a pull from our TFS root into each of the feature branches and resolved any merge issues.&lt;/li&gt;    &lt;li&gt;Created the feature branch in Git via the Windows Github client&lt;/li&gt;    &lt;li&gt;Switched context on our git repository to be that of the new branch&lt;/li&gt;    &lt;li&gt;xCopied our TFS branch files from TFS into the folder of our Git repository&lt;/li&gt;    &lt;li&gt;Let the Windows Github client pick up the changes (I had to restart the Windows client in order for changes to get noticed, but that may not be required for everyone)&lt;/li&gt;    &lt;li&gt;Committed the changes locally&lt;/li&gt;    &lt;li&gt;Synced the changes to Github&lt;/li&gt;    &lt;li&gt;Deleted my old branch&lt;/li&gt;    &lt;li&gt;Had a beer.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;As you can see from above, there were a few steps involved, and there may have been a better way.&amp;#160; However, this just worked for us.&lt;/p&gt;  &lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=70461" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/GitHub/default.aspx">GitHub</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Git/default.aspx">Git</category></item><item><title>Moving from TFS to Github – Steps we took to do the migration</title><link>http://devlicio.us/blogs/derik_whittaker/archive/2012/11/07/moving-from-tfs-to-github-what-we-did.aspx</link><pubDate>Wed, 07 Nov 2012 12:10:12 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70451</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/rsscomments.aspx?PostID=70451</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/commentapi.aspx?PostID=70451</wfw:comment><comments>http://devlicio.us/blogs/derik_whittaker/archive/2012/11/07/moving-from-tfs-to-github-what-we-did.aspx#comments</comments><description>&lt;p&gt;In a &lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2012/09/09/how-to-migrate-your-tfs-repository-to-github.aspx"&gt;previous post&lt;/a&gt; I talked about how to use git tfs to extract your source out of a TFS repository, format it for git and finally push that source to Github.&amp;#160; This post is a follow up to that prior post and will go a bit further in explaining the exact steps, i took, to do a full end to end migration from TFS to Github (git).&lt;/p&gt;  &lt;p&gt;Plan of attack:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Get and install Git TFS (instructions are on this are in my &lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2012/09/09/how-to-migrate-your-tfs-repository-to-github.aspx"&gt;prior post&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;&lt;font color="#ff0000"&gt;&lt;font color="#000000"&gt;Get and install the TFS&lt;/font&gt; &lt;a href="http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f"&gt;Powertools&lt;/a&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;Need to remove all existing TFS bindings from your .csproj and .sln files &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;The way I found to do this, with a bit of help from my &lt;a href="http://twitter.com/bubbafat"&gt;coworker&lt;/a&gt; is check out each and every .csproj/.sln file in my source tree.&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;ol&gt;     &lt;li&gt;Open a Visual Studio Command prompt and CD into the folder where your TFS source is stored &lt;/li&gt;      &lt;li&gt;Run the command -- &lt;em&gt;&lt;strong&gt;tf edit /r *.csproj *.sln&lt;/strong&gt;&lt;/em&gt;&amp;#160; this command will check out each and every csproj/sln file in your file structure.&amp;#160; This MUST be done in the root of your TFS source files. &lt;/li&gt;      &lt;li&gt;Download and run this &lt;a href="http://vsunbindsourcecc.codeplex.com/"&gt;VS Unbind Source&lt;/a&gt; tool I found on codeplex to remove all binding information from the files .        &lt;br /&gt;&lt;font color="#ff0000"&gt;** NOTE **          &lt;br /&gt;I noticed after running this that there may be a bug.&amp;#160; In all my .sln files the ‘EndGlobalSection’ was removed which caused build failures.&amp;#160; I had to manually add them back and then it worked          &lt;br /&gt;** NOTE **&lt;/font&gt;        &lt;br /&gt;&lt;/li&gt;      &lt;li&gt;Run the command – &lt;em&gt;&lt;strong&gt;tfpt uu /r&lt;/strong&gt;&lt;/em&gt; .&amp;#160; this command will revert any files which were not actually edited in order to avoid committing unchanged files. &lt;/li&gt;      &lt;li&gt;Commit the changes to the .csproj and .sln file back to TFS &lt;/li&gt;   &lt;/ol&gt;    &lt;li&gt;Need to export your source from TFS and format it for git.&amp;#160; For this you need to use the git tfs tool for this. &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;CD into the folder where you want to store the new git formatted source and run      &lt;br /&gt;git tfs clone &lt;a href="http://serveraddresshere:8080/tfs/DefaultCollection"&gt;http://serveraddresshere:8080/tfs/DefaultCollection&lt;/a&gt; $/root/foldername here (of course i removed my company specific settings)       &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;Note, this could take a LONG time depending on how much source you have and how many historical commits.&amp;#160; If you don’t care about history do a quick-clone rather than a clone&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;Push your source to Github.      &lt;ul&gt;       &lt;li&gt;This can be done via the command line as:          &lt;br /&gt;git push &lt;a href="http://github.com/[GitHubAccountNameHere]/[RepositoryNameHere"&gt;http://github.com/[GitHubAccountNameHere]/[RepositoryNameHere&lt;/a&gt;] master           &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;This can also be done via the Windows client for Github by simply dropping your root folder into the UI and pushing the changes.&amp;#160; The choice is yours. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Sit back and relax, you are now using Github rather than TFS for your source storage…. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As you can see completely moving from TFS to Github (or git for that matter) is actually pretty easy and can be done with little effort.&lt;/p&gt;  &lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=70451" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/.Net/default.aspx">.Net</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/GitHub/default.aspx">GitHub</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Git/default.aspx">Git</category></item><item><title>How to migrate your TFS Repository to GitHub</title><link>http://devlicio.us/blogs/derik_whittaker/archive/2012/09/09/how-to-migrate-your-tfs-repository-to-github.aspx</link><pubDate>Sun, 09 Sep 2012 11:17:43 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70319</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/rsscomments.aspx?PostID=70319</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/derik_whittaker/commentapi.aspx?PostID=70319</wfw:comment><comments>http://devlicio.us/blogs/derik_whittaker/archive/2012/09/09/how-to-migrate-your-tfs-repository-to-github.aspx#comments</comments><description>&lt;p&gt;So it has begun.&amp;#160; We have been using TFS at work for 2+ years and the time has come to move off of TFS and over to GitHub (we have a few reasons, most of which I am going to avoid for this post as they do not add any real value).&amp;#160; Normally when you are going from one system to another you have to run some sort of conversion, this is kinda true here, but not 100%.&amp;#160; In this case we are going to be doing a conversion and a publication, both of which are simple.&lt;/p&gt;  &lt;p&gt;The basic idea of what we are going to be doing is:&lt;/p&gt;  &lt;p&gt;Clone from TFS –&amp;gt; Push to GitHub –&amp;gt; have a beer :)&lt;/p&gt;  &lt;p&gt;Really, moving from TFS to GitHub (or git in general) is really easy, but does involve a few steps&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Install &lt;a href="http://chocolatey.org/"&gt;Chocolately&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Install &lt;a href="https://github.com/git-tfs/git-tfs"&gt;GitTFS&lt;/a&gt; (&lt;a href="http://chocolatey.org/packages/gittfs"&gt;chocolately package&lt;/a&gt;) – this is a tool which allows you to use git syntax w/ your TFS repository &lt;/li&gt;    &lt;li&gt;Open up a Visual Studio Command prompt &lt;/li&gt;    &lt;li&gt;CD into the directory you whish to clone into &lt;/li&gt;    &lt;li&gt;Clone your TFS repo locally via Git TFS      &lt;br /&gt;There are 2 different ways to do this, you can do a full clone which includes all your commit history or you can do a quick-clone which does not       &lt;br /&gt;      &lt;br /&gt;Clone (this could take a really long time, like hours so be warned)       &lt;br /&gt;git tfs clone &lt;a href="http://[YourTFSServerHere]:8080/tfs/DefaultCollection"&gt;http://[YourTFSServerHere]:8080/tfs/DefaultCollection&lt;/a&gt; $/[NameOfFolderHere]       &lt;br /&gt;      &lt;br /&gt;Quick Clone       &lt;br /&gt;git tfs quick-clone &lt;a href="http://[YourTFSServerHere]:8080/tfs/DefaultCollection"&gt;http://[YourTFSServerHere]:8080/tfs/DefaultCollection&lt;/a&gt; $/[NameOfFolderHere]       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Create your repository on GitHub (I found this was just the simplest way) &lt;/li&gt;    &lt;li&gt;Go back to your command prompt (ensure you are in the directory that has your files) &lt;/li&gt;    &lt;li&gt;Do a git push via     &lt;br /&gt;git push &lt;a href="http://github.com/[GitHubAccountNameHere]/[RepositoryNameHere"&gt;http://github.com/[GitHubAccountNameHere]/[RepositoryNameHere&lt;/a&gt;] master       &lt;br /&gt;      &lt;br /&gt;Make sure you put master as you need to tell it what branch to do the push to.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Go verify your code is in GitHub &lt;/li&gt;    &lt;li&gt;Your done &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;As you can see getting all your files out of TFS and into GitHub is pretty simple, but does involve a few steps (and possibly a few hours depending on how much commit history you have in TFS).&lt;/p&gt;  &lt;p&gt;Hope this helps,&lt;/p&gt;  &lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=70319" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/GitHub/default.aspx">GitHub</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Git/default.aspx">Git</category></item></channel></rss>