Delete (forget) file from SVN?

How to remove a file from SVN version control?

  • Previously, this was done by someone unintentionally.
  • This is a necessary local file, but it is different for everyone and does not need version control.
  • If I delete and commit, it will delete the file for everyone.
  • I can not add the file to svn:ignore while it is in the repo.
  • If I remotely delete and locally ignore and commit, it will work, but I cannot execute, because I will need to update first, but if I update, the file will be deleted.

I would like to delete and ignore this file so that it is not always deleted manually from each commit for everyone without deleting it locally.

The "solution" found here does not work: https://stackoverflow.com/a/216632/

+7
source share
3 answers

TortoiseSVN has a feature called "Unversion and add to ignore list", which can be found in the context menu of Windows Explorer (if you have TortoiseSVN configured to display the context menu).

TortoiseSVN Documentation

+3
source

There is actually no good way to accomplish this using SVN. The best thing you can do is to warn users to update in a certain way for the next update by copying the file and then back after the update.

Sometimes the easiest (or only) way to solve technical problems is through "social engineering".

Finally, I would suggest you give up SVN when you have a chance. Other options out there, such as Mercurial or Git, are much more forgiving.

+2
source

Given that SVN is not designed for this, a better approach might be a two-step update, in which the first update renames the file to some kind of unimportant name. Then write to the developers so that they know that after the update they will have to manually copy the file back to the original name. Then, as soon as everyone processed the update (or ignored it at the same time), you can delete the file from SVN and commit.

+1
source

All Articles