Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move committed changes from trunk to branch

I have several commits at the head of my repositories trunk that contain an initial implementation of a feature that the customer has decided to defer to a future revision.

Is there a clean way to relocate them to a branch and completely remove them from the history that is shown when a user looks at /trunk/myApp/, or is the best I can do to create a new branch containing what is currently the most recent version on trunk and then do a new checkin with a copy of the code from before work on the feature started?

like image 722
Dan Is Fiddling By Firelight Avatar asked Oct 21 '13 15:10

Dan Is Fiddling By Firelight


1 Answers

Subversion doesn't support Git-style rebasing. (Nor would you want to use it in the case where the changes exist on a shared public branch.) So you've got it about right - save off the changes you're interested in in a new branch, then do a reverse merge on trunk to undo those commits. See http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo.

like image 72
randy-wandisco Avatar answered Oct 18 '22 01:10

randy-wandisco