Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create branch on TFS with attaching pending changes to new branch

I was working on main branch and I have done a lot of changes to files. I did not check in those changes. How to create child branch from main, but all local pending changes which are attached to main branch, changes to be attached to newly created child branch.

So basically: How to create child branch with attaching all pending changes of parent branch to child branch?

like image 518
MaciejLisCK Avatar asked Feb 17 '14 12:02

MaciejLisCK


People also ask

How do I create a branch from an existing branch in TFS?

In Source Control Explorer, right-click the folder or file that you want to branch, point to Branching and Merging, and then click Branch. The Branch dialog box appears. In the Target box, modify the location and name for the new branch.

How do I create a feature branch in TFS?

Right-click on the FAST Search folder and select Branching and Merging -> Branch from the context menu. Once you clicked on Branch it will open a prompt window and set the Target location and leave the defaults.

How do I get rid of pending changes in TFS?

Right-click on the file in the Pending Changes List, choose Undo. believe it or not I actually had this same exact problem. I also didn't have the files. I right-clicked "view pending changes" on the solution and it pulled up all of the pending changes to my deleted files.


1 Answers

You can shelve your changes, then use the TFS Power Tools to unshelve them into a different branch.

This is a specific feature of the Power Tools (tfpt unshelve /migrate). It will rewrite server paths to migrate the changes into another branch. See this blog post for more info: http://geekswithblogs.net/TarunArora/archive/2011/06/06/unshelve-shelveset-created-from-one-branch-to-another.aspx

like image 133
Dylan Smith Avatar answered Oct 17 '22 06:10

Dylan Smith