Search code examples
svncopyrepositorybranch

SVN branch question


When creating a branch, what are the implications of selecting the following?

Create copy in the repository from:

  • HEAD revision in the repository
  • Specific revision the repository
  • Working copy

Solution

  • In short:

    • creating from the HEAD revision is creating a branch starting from "now", where "now" is the latest version committed to the repository
    • creating from a specific revision is creating a branch starting from a point in the past (identified by its revision number)
    • creating from the working copy is sort of like creating a branch starting from a point in the future (your working copy, as yet uncommitted)

    Depending on the purpose for creating the branch, you will usually choose one of the first two options. The third option is probably less commonly used.

    You would branch from the HEAD if you want to do some exploratory development for a particular purpose, or you want to start creating a different version for a specific customer or something. You would branch from the past if you need to make a patch to a previously released version of your software.