{"id":94,"date":"2019-05-14T09:03:08","date_gmt":"2019-05-14T09:03:08","guid":{"rendered":"http:\/\/yer.ac\/blog\/?p=94"},"modified":"2020-06-17T14:16:18","modified_gmt":"2020-06-17T14:16:18","slug":"unshelving-tfs-changes-into-another-branch-vs-2017","status":"publish","type":"post","link":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/","title":{"rendered":"Unshelving TFS changes into another branch (VS 2017)"},"content":{"rendered":"\n<p> <strong>EDIT: This was updated from an original article on 2013\/15. There is an additional pre-requisite below<\/strong> <span class=\"has-inline-color has-vivid-red-color\">(See red)<\/span> <strong>for doing this with 2017\/19.<\/strong> <\/p>\n\n\n\n<p>I had some pending changes recently on the wrong branch within TFS in Visual Studio 2017. Rather than clone all my changes in the other branch, I wanted to &#8220;migrate&#8221; my changes. In GIT this is fairly trivial, in TFS however&#8230;<\/p>\n\n\n\n<p>To move changes between 2 branches, you have to ensure:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The changes you want to migrate are <strong>shelved<\/strong> on the source branch.<\/li><li>There are <strong>no<\/strong> <strong>pending changes<\/strong> in the workspace &#8211; This was rather annoying but a limitation of the tooling.<\/li><li>You do a &#8220;get-latest&#8221; on both branches.<\/li><li>You have access to Visual Studio Command Prompt.<\/li><li>TFS Power tools . <strong><span class=\"has-inline-color has-vivid-red-color\">(Edit: See below)<\/span><\/strong>. Either 2013 (<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=TFSPowerToolsTeam.MicrosoftVisualStudioTeamFoundationServer2013Power\">https:\/\/marketplace.visualstudio.com\/items?itemName=TFSPowerToolsTeam.MicrosoftVisualStudioTeamFoundationServer2013Power<\/a>) or 2015 (<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=TFSPowerToolsTeam.MicrosoftVisualStudioTeamFoundationServer2015Power\">https:\/\/marketplace.visualstudio.com\/items?itemName=TFSPowerToolsTeam.MicrosoftVisualStudioTeamFoundationServer2015Power<\/a>)<\/li><li>The source and target branch are in <strong>the same workspace. <\/strong>This took me longer than I want to admit to work out as the error is not helpful!<\/li><\/ul>\n\n\n\n<p>With the above prerequisites met, you need to spin up the VS Command Prompt. This can be found via a start menu search but you can also add it to VS (If not already), following the steps below in VS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"has-inline-color has-vivid-red-color\">Update for VS2015\/17\/19<\/span><\/h2>\n\n\n\n<p><span class=\"has-inline-color has-vivid-red-color\">This article was originally written for VS2013\/15 and ported over. I failed to mention that the TFPT required VS2013 or 15 on the box.  You can still follow the instructions below but will need to install the VS that matches the power-tools being used. <strong>You can use the free Team Explorer<\/strong> <strong>or Express version<\/strong> to do this and don&#8217;t require a full licence copy to use TFPT against it. <\/span><\/p>\n\n\n\n<p>The easiest way to acquire this (2013 Team Explorer for example) is via Chocolatey, at <a href=\"https:\/\/chocolatey.org\/packages\/VisualStudio2013TeamExplorer\">https:\/\/chocolatey.org\/packages\/VisualStudio2013TeamExplorer<\/a><strong> <\/strong>or via the Microsoft downloads page for older versions. <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/older-downloads\/\">https:\/\/visualstudio.microsoft.com\/vs\/older-downloads\/<\/a> <\/p>\n\n\n\n<p>Either way, you will need a VS to match the version of Power Tools &#8211; i.e. TFPT 2013 needs VS 2013 and TFPT 2015 needs VS 2015.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adding Visual Studio Command Prompt to Visual Studio<\/h2>\n\n\n\n<p>Go to &#8220;Tools&#8221; &gt; &#8220;External Tools&#8221;, and select &#8220;Add&#8221;.<\/p>\n\n\n\n<p>Give it an appropriate title &#8211; I chose &#8220;VS Command Prompt.&#8221;. From here we want to specify the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Command:  C:\\Windows\\System32\\cmd.exe<\/li><li>Arguments: \/k &#8220;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\VsDevCmd.bat&#8221;<\/li><li>Initial Directory: $(SolutionDir)<\/li><\/ul>\n\n\n\n<p>This means (On saving) that if you go to &#8220;Tools&#8221; you will now see an option &#8220;VS Command Prompt&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Back to the migration&#8230;<\/h2>\n\n\n\n<p>With the console open, and using a working directory of a folder under source control (I use the source solution directory), run the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tfpt unshelve \/migrate \/source:\"$\/Core\/MyProduct\" \/target:\"$Core\/MyProduct-Branch\" \"MyShelveset\"<\/code><\/pre>\n\n\n\n<p>In this command, we are saying to use the TFS Power Tool to unshelve a shelveset named &#8220;MyShelveset&#8221;. The migrate flag indicates that it will be moving between areas, and the source and target are named TFS folders.<\/p>\n\n\n\n<p>If you get an error &#8220;<strong>An item with the same key has already been added<\/strong>&#8220;, ensure you do not have any pending changes in the source or target.<\/p>\n\n\n\n<p>If you get an error &#8220;<strong>unable to determine the workspace<\/strong>&#8220;, make sure you are running the tool within a directory under the source folder.<\/p>\n\n\n\n<p>Providing this command runs successfully, you will then see the &#8220;Shelveset Details&#8221; panel.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"447\" data-attachment-id=\"98\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/image-19\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=769%2C447&amp;ssl=1\" data-orig-size=\"769,447\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407\" alt=\"\" class=\"wp-image-98\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?w=769&amp;ssl=1 769w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?resize=300%2C174&amp;ssl=1 300w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?resize=768%2C446&amp;ssl=1 768w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?resize=700%2C407&amp;ssl=1 700w\" sizes=\"auto, (max-width: 769px) 100vw, 769px\" \/><figcaption>Shelveset details<\/figcaption><\/figure>\n\n\n\n<p>In this panel you should see the files that make up the shelveset you defined in the command. Pressing &#8220;Unshelve&#8221; will start the process.<\/p>\n\n\n\n<p>In my case I also saw a &#8220;Unshelve\/Merge Shelveset&#8221; window. You should be able to &#8220;auto-merge all&#8221;.<\/p>\n\n\n\n<p>Oddly, Auto-Merge took quite a while on my machine (You can see the progress in the cmd window). I am unsure if this is normal, or because I was remote working that day over a VPN.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> <em>&#8220;Item could not be found in your workspace, or  you do not have permission to access it.<\/em> &#8220;<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"417\" height=\"173\" data-attachment-id=\"102\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/image-20\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-2.png?fit=417%2C173&amp;ssl=1\" data-orig-size=\"417,173\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-2.png?fit=417%2C173&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-2.png?resize=417%2C173\" alt=\"&quot;Item could not be found in your workspace, or  you do not have permission to access it.\" class=\"wp-image-102\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-2.png?w=417&amp;ssl=1 417w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-2.png?resize=300%2C124&amp;ssl=1 300w\" sizes=\"auto, (max-width: 417px) 100vw, 417px\" \/><figcaption>&#8220;Item could not be found in your workspace, or  you do not have permission to access it.&#8221;<br><\/figcaption><\/figure><\/div>\n\n\n\n<p>If you get this during the merge, you may do what I did and go down a rabbit hole of getting latest, checking mappings etc. Turns out that <strong>this command does not work cross-workspace.<\/strong> When I branch, I map the branch to a completely new workspace as it&#8217;s cleaner.<\/p>\n\n\n\n<p class=\"has-text-align-left\">The workaround for this (If like me, you use a new workspace per branch) is to temporarily map the branch into the same workspace.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrap up<\/h2>\n\n\n\n<p>So overall, it is possible to do but a process that would take a GIT Novice like me  minutes to do in GIT took closer to an hour total! Luckily this is still less effort than a manual merge, but if you only had a couple of files I would recommend just doing it manually&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bonus round: Unshelving another users shelveset into another branch<\/h2>\n\n\n\n<p>If the shelveset is a colleagues and not yours, you can simply append &#8220;;username&#8221; at the end of the command above (Where username is their TFS user), and it will search for that shelveset under that user.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EDIT: This was updated from an original article on 2013\/15. There is an additional pre-requisite below (See red) for doing this with 2017\/19. I had some pending changes recently on the wrong branch within TFS in Visual Studio 2017. Rather than clone all my changes in the other branch, I wanted to &#8220;migrate&#8221; my changes. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[17,18],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-development","tag-tfs","tag-visualstudio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Unshelving TFS changes into another branch (VS 2017)<\/title>\n<meta name=\"description\" content=\"Unshelving yours or another users&#039; shelveset to a different branch in TFS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unshelving TFS changes into another branch (VS 2017)\" \/>\n<meta property=\"og:description\" content=\"Unshelving yours or another users&#039; shelveset to a different branch in TFS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/\" \/>\n<meta property=\"og:site_name\" content=\"yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-14T09:03:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-17T14:16:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407\" \/>\n<meta name=\"author\" content=\"yer.ac\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yer.ac\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/\"},\"author\":{\"name\":\"yer.ac\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"headline\":\"Unshelving TFS changes into another branch (VS 2017)\",\"datePublished\":\"2019-05-14T09:03:08+00:00\",\"dateModified\":\"2020-06-17T14:16:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/\"},\"wordCount\":848,\"commentCount\":11,\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i1.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/image-1.png?fit=700%2C407\",\"keywords\":[\"TFS\",\"VisualStudio\"],\"articleSection\":[\"Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/\",\"name\":\"Unshelving TFS changes into another branch (VS 2017)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i1.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/image-1.png?fit=700%2C407\",\"datePublished\":\"2019-05-14T09:03:08+00:00\",\"dateModified\":\"2020-06-17T14:16:18+00:00\",\"description\":\"Unshelving yours or another users' shelveset to a different branch in TFS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i1.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/image-1.png?fit=700%2C407\",\"contentUrl\":\"https:\\\/\\\/i1.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/image-1.png?fit=700%2C407\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/05\\\/14\\\/unshelving-tfs-changes-into-another-branch-vs-2017\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unshelving TFS changes into another branch (VS 2017)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\",\"name\":\"yer.ac | Adventures of a developer, and other things.\",\"description\":\"Blog to keep track of things I am upto\",\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yer.ac\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\",\"name\":\"yer.ac\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"caption\":\"yer.ac\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unshelving TFS changes into another branch (VS 2017)","description":"Unshelving yours or another users' shelveset to a different branch in TFS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/","og_locale":"en_US","og_type":"article","og_title":"Unshelving TFS changes into another branch (VS 2017)","og_description":"Unshelving yours or another users' shelveset to a different branch in TFS.","og_url":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/","og_site_name":"yer.ac | Adventures of a developer, and other things.","article_published_time":"2019-05-14T09:03:08+00:00","article_modified_time":"2020-06-17T14:16:18+00:00","og_image":[{"url":"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407","type":"","width":"","height":""}],"author":"yer.ac","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yer.ac","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#article","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/"},"author":{"name":"yer.ac","@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"headline":"Unshelving TFS changes into another branch (VS 2017)","datePublished":"2019-05-14T09:03:08+00:00","dateModified":"2020-06-17T14:16:18+00:00","mainEntityOfPage":{"@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/"},"wordCount":848,"commentCount":11,"publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"image":{"@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407","keywords":["TFS","VisualStudio"],"articleSection":["Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/","url":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/","name":"Unshelving TFS changes into another branch (VS 2017)","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#primaryimage"},"image":{"@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407","datePublished":"2019-05-14T09:03:08+00:00","dateModified":"2020-06-17T14:16:18+00:00","description":"Unshelving yours or another users' shelveset to a different branch in TFS.","breadcrumb":{"@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#primaryimage","url":"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407","contentUrl":"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-1.png?fit=700%2C407"},{"@type":"BreadcrumbList","@id":"https:\/\/yer.ac\/blog\/2019\/05\/14\/unshelving-tfs-changes-into-another-branch-vs-2017\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yer.ac\/blog\/"},{"@type":"ListItem","position":2,"name":"Unshelving TFS changes into another branch (VS 2017)"}]},{"@type":"WebSite","@id":"https:\/\/yer.ac\/blog\/#website","url":"https:\/\/yer.ac\/blog\/","name":"yer.ac | Adventures of a developer, and other things.","description":"Blog to keep track of things I am upto","publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yer.ac\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d","name":"yer.ac","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","caption":"yer.ac"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paP5IW-1w","jetpack-related-posts":[{"id":436,"url":"https:\/\/yer.ac\/blog\/2021\/03\/10\/moving-local-workspaces-between-users-vs2019-tfs-self-hosted-azure-devops\/","url_meta":{"origin":94,"position":0},"title":"Moving local workspaces between users VS2019\/TFS [Self Hosted\/ Azure Devops]","author":"yer.ac","date":"March 10, 2021","format":false,"excerpt":"Whilst I use GIT for most my source control these days, I still have some projects in TFSVC. On a recent switch of Visual Studio accounts I temporarily lost access to my mapped workspaces as these are linked to the VS logged in user, rather than to the machine. This\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":432,"url":"https:\/\/yer.ac\/blog\/2021\/03\/09\/adding-vs-developer-command-prompt-to-windows-terminal-vs-2019\/","url_meta":{"origin":94,"position":1},"title":"Adding VS Developer Command Prompt To Windows Terminal (VS 2019)","author":"yer.ac","date":"March 9, 2021","format":false,"excerpt":"In an effort to be using Windows Terminal for everything Powershell\/Command related these days it occurred to me that I hadn't moved my VS2019 Command Prompt to Windows Terminal. This meant having to open VS all the time (as well as make sure that the command was mapped in external\u2026","rel":"","context":"In &quot;Productivity&quot;","block_context":{"text":"Productivity","link":"https:\/\/yer.ac\/blog\/category\/productivity\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-1.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":333,"url":"https:\/\/yer.ac\/blog\/2019\/11\/06\/pragmatically-upgrading-net-framework-version-for-all-projects-with-powershell\/","url_meta":{"origin":94,"position":2},"title":"Pragmatically upgrading .net framework version for  all projects with PowerShell","author":"yer.ac","date":"November 6, 2019","format":false,"excerpt":"We had a situation where we needed to upgrade all the CSPROJ files in a solution to 4.8. The issue is that some of our solutions contain almost a hundred projects so a manual intervention would be prone to error. (plus we have multiple solutions to apply this against!) Whilst\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8,"url":"https:\/\/yer.ac\/blog\/2019\/03\/19\/my-attempt-at-using-sonarqube-for-static-code-analysis\/","url_meta":{"origin":94,"position":3},"title":"My attempt at using SonarQube for static code analysis","author":"yer.ac","date":"March 19, 2019","format":false,"excerpt":"This post covers my attempts to use SonarQube as a stand-alone install to perform static code analysis on a regular basis. This will cover purely getting the tool working, Maybe I will pick up how I can use the data in a later post? I will be doing this in\u2026","rel":"","context":"In &quot;Development&quot;","block_context":{"text":"Development","link":"https:\/\/yer.ac\/blog\/category\/development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":315,"url":"https:\/\/yer.ac\/blog\/2019\/10\/16\/ensuring-dotnet-test-trx-coverage-files-end-up-in-sonarqube\/","url_meta":{"origin":94,"position":4},"title":"Ensuring &#8220;dotnet test&#8221; TRX &#038; Coverage files end up in SonarQube","author":"yer.ac","date":"October 16, 2019","format":false,"excerpt":"I have written before about using SonarQube to do static analysis, but one issue I never came back to was ensuring that code coverage files generated via a build pipeline end up being picked up by the Sonar Scanner to assess code coverage. Note that the following I am actually\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/10\/image.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":337,"url":"https:\/\/yer.ac\/blog\/2019\/11\/20\/identifying-nuget-package-references-which-are-using-relative-paths-across-whole-solution\/","url_meta":{"origin":94,"position":5},"title":"Identifying Nuget package references which are using relative paths across whole solution","author":"yer.ac","date":"November 20, 2019","format":false,"excerpt":"Keeping up with a recent binge upgrading projects, including upgrading all my projects in a solution to 4.8, I have been upgrading nuget packages. Whilst this is a relatively simple task, what irks me is that when you add or upgrade a nuget package in Visual Studio, it will often\u2026","rel":"","context":"In &quot;Development&quot;","block_context":{"text":"Development","link":"https:\/\/yer.ac\/blog\/category\/development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/11\/image-2.png?fit=376%2C382&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":14,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}