简体   繁体   中英

Merge from one branch's working copy to another branch (locally, w/o committing)

Most of my experience is with Perforce and my last svn experiences were ages ago, so I'm not yet that comfortable with (Tortoise) svn (again).

I want to move changes over from a working copy to a freshly checked out working copy in another related branch.

To be preceise, consider:

    trunk_revx
        |     \
        |      Branch_A
    trunk_revy   \
        |\       WC_A (containing my changes)
        | \
        |  Branch_B
        |    \
        |    WC_B (fresh, where I want to merge my changes to)

Which would be the correct command to get me a three-way-merge between WC_A, trunk_revx and WC_B without committing anything? Merge (call in which WC folder?) or Switch (again, call where?)?

All the terms are different, So I'm a little lost ;)

I suggest you the following actions:

  1. From WC_A: save your local changes by creating a patch file with TortoiseSVN (in case the next actions would fail and lose your changes)
  2. From WC_A: perform TortoiseSVN ==> switch... and switch to Branch_B:
    • the Branch_B is merged into WC_A (locally)
    • and your local modifications are kept
    • and now your WC_A points to Branch B

You just have to deal with the fact that your WC_A becomes your WC_B !

Alternatively, if you don't want to commit into Branch_A, but can commit anyway, you could also commit local changes to a new small branch (a branch of branch_A) and perform a merge from this new branch to Branch_B.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM