开发者

Completely and utterly screwed up svn repo - how to start fresh

开发者 https://www.devze.com 2023-01-18 13:07 出处:网络
So I recently had a tree conflict when trying to merge a branch into the trunk. This cascaded into a series of events in which I scrambled to try and fix the issue, but now just can\'t really do anyth

So I recently had a tree conflict when trying to merge a branch into the trunk. This cascaded into a series of events in which I scrambled to try and fix the issue, but now just can't really do anything (things won't commit, things won't update, etc.)

How can I just say, okay -- go back to here and start fresh, or what other techniques can I use to get myself out of this situation. I realize I hav开发者_运维知识库en't provided much detail, but all I really know at this point is that I screwed up, badly (No need to worry about other developers working on it, I'm only one).


Exactly how you do it depends on your tools. The thing about Subversion is that you always have your history, so you're never totally and completely hosed. I'll assume you're using Tortoise.

The first thing is to check out a new, fresh copy somewhere else. Next, inside that directory do a "Show Log" command. Right-click on the history item which has the last "un-screwed up" version of your code and select "Revert to this Revision". It will then warn you that you're going to do a reverse merge back into your working copy. That's fine. Accept it. After reverting, verify your code works, and you can commit once again, and you're back to where you started.


svn resolve --accept working

often brings subversion repositories back to life.

0

精彩评论

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