Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit local changes after branch was reintegrated

something that shouldn't happen, happened to me today. We were working on a feature branch in svn (Server afaik 1.6, client 1.7). This branch was reintegrated yesterday, while i was not in the office. Now i'm left with some local changes in my working copy, pointing to the already reintegrated branch. Of course its partially my fault of leaving changes locally after work, but thats another story ;-)

I know that reintegrating the branch again is not an option, so What are the best ways to bring my changes into the trunk? A Coworker suggested using patches, which i never used before. I also thought about cherry picking my changes, after commiting them into the branch, but i'm not sure if this would work. Are there any other options?

Any help is greatly appreciated.

Best regards Nico

like image 580
dowhilefor Avatar asked Dec 15 '11 10:12

dowhilefor


2 Answers

After reintegration, the branch and the trunk should be identical (let's say the head revision is at 100). So, you could just commit your changes in the feature branch (creating rev 101), and merge to the trunk the feature branch from 100 (exclusive) to 101 (inclusive). Then delete the feature branch.

like image 74
JB Nizet Avatar answered Sep 20 '22 13:09

JB Nizet


Create a new branch for your features and switch (as in svn switch) the uncommitted working copy to it. Test, commit, and then merge into trunk.

like image 34
thiton Avatar answered Sep 21 '22 13:09

thiton