tags:

views:

62

answers:

5

I needed to do some feature development on a branch, so I created one and now I've merged it back into trunk.

The question is, what do I do with that branch? What's the wise thing to do? Do I remove it from the repos?

It feels untidy and unnecessary to just leave it there.

+2  A: 

Normally you just leave it there. It's useful for browsing the repository if you want to see specific commits made during that branch in the future (so you don't have to find and browse a revision). If you aren't going to need that anymore, I would recommend tagging it anyway before deleting.

amccausl
A: 

It serves a historical purpose, keep it for that reason. I have on the occasion needed to look through branch history to see what has been changed, either for a single file or across the project. Having a historical record of changes which hopefully includes comments along with the commit can become a valuable resource for future developers (and that future developer may be you).

krock
A: 

I always leave them around; that way I'm sure to never inadvertently re-use a branch name, and any http links to the branch (in documentation or reports) won't break.

If it really bugs you, since it was only a feature branch, you can delete it if you've merged everything to the trunk; you'll probably never bother to look at it again. But remember that it doesn't "do" anything just sitting there; it's always going to be in the history whether it apppears on the HEAD or not. You won't "clean" anything by deleting it, you'll actually just be adding a needless revision to the repository.

Zac Thompson
A: 

The manual states that you "may" want to delete it. Of course, an svn log on the branches directory will show all past branches. In addition, the reintegrated branch is now unusable. If you have multiple branches at once, it's nice to remove defunct ones.

rlbond
A: 

Alright, I understand where everyone is coming from, but decided the branch can be gone. I just don't want to see lots of inactive branches.

Having said that, I did create a tag of the branch.

Here's what I found to support my opinion:

You don’t have to delete the branch, but over time your branches area of your repository will get cluttered, and in any event if they’re not actively being worked on the branches are just taking up space and adding to later confusion. Keeping your branches limited to things you’re actively working on is simply a good habit to get into, just like making sure your codebase itself remains tidy and not filled with old commented out bits of code.

...

Don’t be too afraid of this, though. You can still get to the files by viewing the log for branches, and selecting a previous revision (anything before the delete action)[.]

Source: http://stevesmithblog.com/blog/simple-branching-and-merging-with-svn/

Pilgrim