UPDATE: Don’t follow this guide, look down in the comments and do what John suggested. This totally screwed me up, as none of the changes I did before I created the branch came through in the merge.
I started working on a new feature for my product today, and realized after several hours that committing my code would be a bad idea. The new feature is big enought that I should have started working on it in a branch, but I didn’t think of that early enough. I thought there would be a simple way to “commit changes to a new branch”, but I wasn’t able to find any obvious way to do that. Here are the steps I took to get this accomplished.
From trunk checkout with uncommitted files:
That’s all there is to it. If you know an easier way to do this, let me know. I wonder if I had done the “svn add” commands before the switch if that step would have been unnecessary.
This blog is a dumping grounds for my experiences as a web developer, a parent, an artist, a writer and a human being. Maybe someday there will be something here that is worth your time, some sort of useful information or words that piece your very soul. Probably not though.