Commit changes to a different branch than the currently checked out branch with subversion

后端 未结 3 1095
北荒
北荒 2021-01-29 22:59

I\'ve been working on code checked out from the development line and discovered that the changes made might be breaking changes and need to be moved to an experimental branch be

相关标签:
3条回答
  • 2021-01-29 23:24

    You should create a branch from a known sourceURL (this would be your 'development line' you mentioned in the question) first:

    svn copy sourceURL branchURL
    

    Then, switch to that branch:

    svn switch branchURL
    

    And commit your changes:

    svn commit
    
    0 讨论(0)
  • 2021-01-29 23:24

    You can create a new branch directly from your working directory and switch the working directory to that branch.

    The commands are svn copy and svn switch

    0 讨论(0)
  • 2021-01-29 23:26

    You could do it in the TortoiseSVN like that:

    • Right click on the directory where are the changes you want to branch. It must not be the root of the repository, less to duplicate in that way;
    • Select TortoiseSVN -> "Branch/tag...";
    • Set To URL: "svn://host/repository/FooBar/branches/FooBarBranchName";
    • Make sure [*] Working copy is selected. This will ensure the changes are commited;
    • Log message: "Experimenting with flies :)";
    • Optional: Tick [*] Switch working copy to new branch/tag. This is useful if you are planning to keep working on the new branch. Although you can switch to it later too.
    • Try to find the OK button. Hint: it is in the lower part of the window centred.

    Enjoy!

    0 讨论(0)
提交回复
热议问题