Jared Eitnier
Jared Eitnier

Reputation: 7152

svn: If I am done with a feature branch should I delete my working copy?

I've just completed a feature branch and merged the branch back into the trunk. Should I now delete my current working copy and checkout a fresh new copy when I'm ready to work on the next branch?

I would think this is a yes or it's up to you because I may want to checkout completely different files next time.

Upvotes: 1

Views: 340

Answers (5)

maxim1000
maxim1000

Reputation: 6375

Usually I name working copy after branch. This helps me to remember where I'm making changes (while multitasking is not the best thing for brain, it happens :) ). So when branch is reintegrated I delete it, because another branch will have different name.

An exception - the change is really little and deleting/checking out/building takes much time. But to avoid confusion, these cases should be really exceptions.

Upvotes: 0

manripaninder
manripaninder

Reputation: 9

Ideally, i would have marked the branch as DEAD, but SVN does not provides this facility as yet. You can delete the branch, but then this will also delete the revision history of the branch. An alternative is to rename the branch and append something like DEAD to the branch name, to get a clear indication that the branch should not be used for further development.

  • Your revision history for the branch will still be available.
  • It will prevent someone from accidently merging their changes in the now DEAD branch, because their SVN client will be pointing to the previous branch name.

Upvotes: 0

manojlds
manojlds

Reputation: 301527

By defintion of a feature branch - I would delete the working copy. But you can as well switch to a different one, when you start working on another.

Upvotes: 1

mliebelt
mliebelt

Reputation: 15525

If you have done it by reintegration (see Subversion branch reintegration), you are on the trunk. So its up to you, if you want to create a new branch, work on the trunk. Because the trunk is current, and a new created branch will it be as well, a switch will be much cheaper.

Upvotes: 1

ryanprayogo
ryanprayogo

Reputation: 11837

It's up to you. I personally would just update to trunk (or to a new feature branch) instead of deleting my working copy and checking out a new copy

Upvotes: 1

Related Questions