Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve changes between local and shelveset

I have local changes on my machine.

My coworker has shelved changes with files that overlap my changes.

I'd like to pull my coworker's shelveset and resolve the conflicts.

However, when I try to unshelve, I get an error message :

"The item ... has an incompatible pending change."

How can I merge in my coworker's changes?

like image 664
Mashmagar Avatar asked Nov 29 '12 18:11

Mashmagar


2 Answers

I ran into this the other day and a co-worker gave me this great simple tip.

There is an easy way to do this using Visual Studio Power Tools. You can perform the unshelve and merge together by using the tfpt unshelve command from a Visual Studio command prompt. Make sure your active directory is a directory that is mapped to your local workspace otherwise you may see "Unable to identify workspace". When you run the command you'll be presented with a dialog to choose your shelveset. After that, you will receive an additional dialog that allows you to merge conflicting files.

like image 116
BenR Avatar answered Oct 26 '22 01:10

BenR


You will first need to undo any of the changes that you have done in the files that are also in the shelved changeset. You can then unshelve and put your changes back.

Another way is to check in your changes and then unshelve. Or the other way around, first check in the shelved changes and then get the latest version where you will have to manually handle any conflicts.

like image 39
Chrono Avatar answered Oct 26 '22 00:10

Chrono