carpediemevive Posted April 2, 2012 Report Share Posted April 2, 2012 I have a changeset with two small changes in it. I want to undo one of these changes. I went to do a subtractive merge, and I have to do a full subtractive merge in order to complete it. I can easily just complete the subtractive merge, and then re-make the second small change, but I'm wondering is there a better way to do it, or is this just a lesson to really make even tinier commits? Link to comment Share on other sites More sharing options...
manu Posted April 2, 2012 Report Share Posted April 2, 2012 Hi carpediemevive, in your case I think the easier way is the revert operation. Just open the history view of the item you want to "undo" and select the "good" revision. Right click on it and select the revert to this revision option. The subtractive merge is useful when you want to completely extract a changeset, for example if you are integrating task branch and it breaks the release tests, you subtractive merge the changeset created in order to get rid of it. Link to comment Share on other sites More sharing options...
Guest Posted April 2, 2012 Report Share Posted April 2, 2012 Why not reverting the undesired revision to the previous one? This create a simple new changeset without making your branch dirt with special merge links. Best, Luis Link to comment Share on other sites More sharing options...
carpediemevive Posted April 2, 2012 Author Report Share Posted April 2, 2012 Why? Because I always make things more difficult than they have to be . This was absolutely the answer all along, I've just never had cause to do it before so didn't think about it that way. Thanks for clearing it up for me! Link to comment Share on other sites More sharing options...
manu Posted April 2, 2012 Report Share Posted April 2, 2012 Why? Because I always make things more difficult than they have to be . xD it happens to me also, don't worry we are here to help and I'm sure that your question will help more users. The revert operation is more or less hidden but it's really useful in this kind of scenarios. Link to comment Share on other sites More sharing options...
cidico Posted April 2, 2012 Report Share Posted April 2, 2012 I guess this could be solved with the famous "Delete changeset" right? Link to comment Share on other sites More sharing options...
carpediemevive Posted April 2, 2012 Author Report Share Posted April 2, 2012 The changeset in which this occurred wasn't the last on the branch, and there were changes in the changeset I wanted to keep, so it was slightly different. I had occasion to delete a changeset just yesterday though! I'm full of bad commits I suppose/ Link to comment Share on other sites More sharing options...
manu Posted April 4, 2012 Report Share Posted April 4, 2012 And remember that sometimes is more stylish to perform a subtractive merge instead of deleting the changeset. Always speaking in terms that you want to "remove" all the changeset contents" Link to comment Share on other sites More sharing options...
cidico Posted April 4, 2012 Report Share Posted April 4, 2012 I need to do a little study about this subtractive merge... I'm a little afraid of using this... It seems to be a "BAAAAAAD BAAAAAAAAAD THING" to me. Link to comment Share on other sites More sharing options...
manu Posted April 4, 2012 Report Share Posted April 4, 2012 xD it's very easy! It's like an anti-merge, it takes the changes introduced in the changeset and it leaves the files modified as they were before the "bad-commit" (but keeping the traceability) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.