0

tfpt.exe is not exist anymore from VS 2017 and beyond. So how can I move files from one branch to another without checking them in. Say I've accidentally written code in the wrong branch or I'm told to move my change to a different version before checking in. This happens all the time. If there is not a way to do this, then either TFS is broken or I'm using it wrong.

This no longer works:

tfpt unshelve /migrate /source:"$/MyProject/DevCurrent/DevMain" /target:"$/MyProject/DevNext/DevMain" "Temp"

Please don't mark this question as duplicate without making sure it actually is. I've been researching this all day, and there have been 15 million different ways of doing this over the past ten years none of which work on modern tooling.

I need a solution for TFS 2018 and Visual Studio 2017. I do not have control over these versions.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
Jordan
  • 9,642
  • 10
  • 71
  • 141

2 Answers2

1

After I had the same problem with VS2019, my best way to to it was to copy/paste the modified source folder to the branch target folder and use

tf reconcile /promote

to detect all added or changed files.

Kelon
  • 821
  • 10
  • 10
0

This happens all the time.

Why? it shouldn't happens all the time. check where you are and then start coding.

I've been researching this all day

So I guess you see this question, if the answers there not good for you, let me suggest a simple way to do that, but it's manual way and not just run a command:

1) You change a file and suddenly you put attention that you are in the wrong branch.

2) You don't want check-in the changes to the wrong branch.

3) In the past you put the file in Shelveset and then tfpt ..., but now the command no longer exist.

3) No problem. Go to your local folder, copy the file (with the changes).

4) Go to the correct branch local folder and paste the file there.

5) Go to Pending Changes and "Undo" the changes in the wrong branch.

6) Check in only the file in the correct branch.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
  • I do check where I am. But when you have four environments in twenty projects, the mistake will sometimes be made. And there are times where halfway through a change, I'm told to move it to a different environment. This happens to me all the time. – Jordan May 22 '19 at 13:35
  • I have been researching this all day. I've been pulling my hair out. This is not a solution. I might as well redo the changes manually in the other branch. – Jordan May 22 '19 at 14:10
  • Ok :( I tried to help. I don't think you have another option. if you will find one please update :) thanks! – Shayki Abramczyk May 22 '19 at 14:22
  • I will. Thanks for trying to help. – Jordan May 23 '19 at 12:51