Temporarily put away uncommitted changes in Subversion (a la “git-stash”)

前端 未结 16 1744
轮回少年
轮回少年 2020-11-28 17:18

While programming software stored in a Subversion repo, I often modify some files, then notice that I\'d like to do some preparatory change for my main work. E.g. while impl

16条回答
  •  一向
    一向 (楼主)
    2020-11-28 18:14

    When I've got uncommitted changes from one task in my working copy and I need to switch to another task, I do one of two things:

    1. Check out a new working copy for the second task.

      or

    2. Start a branch:

      workingcopy$ svn copy CURRENT_URL_OF_WORKING_COPY SOME_BRANCH
      workingcopy$ svn switch SOME_BRANCH
      workingcopy$ svn commit -m "work in progress"
      workingcoyp$ svn switch WHATEVER_I_WAS_WORKING_ON_BEFORE
      

    I have some scripts that help to automate this.

提交回复
热议问题