开发者

How do I back out from a botched branch switch?

开发者 https://www.devze.com 2023-01-28 12:59 出处:网络
Thi开发者_Python百科s is my branching routine in Subversion: $ svn cp ^/trunk ^/branches/foo -m \"Created working branch.\"

Thi开发者_Python百科s is my branching routine in Subversion:

$ svn cp ^/trunk ^/branches/foo -m "Created working branch."
$ svn switch ^/branches/foo

The problem is that I often forget to change to the root of the working copy, thus switching into a different directory and getting dozens of wrong changes. How do I revert such a wrong switch? What if I have some dirty files in the working copy that I wanted to commit into the new branch? Is there something like git stash in Subversion? Am I doing something wrong?


You should be able to go to the root of the working copy you're using and do an svn switch to the branch you're currently using or the one you want to go to. This should clean up the accidental switch at the sub directory level.

0

精彩评论

暂无评论...
验证码 换一张
取 消