WelcomeTo
WelcomeTo

Reputation: 20571

SVN, Restore previous state

Help me to solve following problem with SVN.

I have 2 branches. First branch was under active development so it have some uncommitted changes. But in second (production) branch I found a bug so I want to quickly fix it. So I switched from first branch (with uncommitted state) to second branch (where I want quickly fix a bug). And now first branch was merged to second (with many conflicts etc..)! I really don't know how to solve this problem. At minimum I want to revert all changes (not svn revert command, I mean to restore previous state, before swtiching from one branch to another)

i.e. I need to rollback last switch command

Upvotes: 0

Views: 147

Answers (1)

Bruce
Bruce

Reputation: 7132

There is no better way than using your brain : your local copy is now messed up and you can't revert your action, there is no way to do it.

With some luck, your ide has an internal backup (thinkihng eclipse e.g.) and you can revert to a previous version of the file and salvage some of your work.

Rule of thumb for the future :

  • never switch with local changes unless you know what you're doing
  • keep different workspaces for different kind of works (I usually have a "fix" workspace and a few "dev" workspace)
  • if you're using externals, than the evil can be even worse :-)

Upvotes: 1

Related Questions