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

前端 未结 16 1777
轮回少年
轮回少年 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:00

    This blog post advises using diff and patch.

    • git stash approximately becomes svn diff > patch_name.patch; svn revert -R .
    • git stash apply becomes patch -p0 < patch_name.patch

    Note that this doesn't stash metadata changes or (I think) directory creates/deletes. (Yes, svn tracks those separately from directory contents, unlike git.)

提交回复
热议问题