0

Does anyone know how I can untrack a couple of files committed by accident?

I'm looking for the equivalent of the Mercurial hg forget command.

I'd especially appreciate any answers that explain how to untrack files using the Spring Tool Suite IDE, i.e. not from command line.

Martin Lippert
  • 5,988
  • 1
  • 15
  • 18
Lydia Ralph
  • 1,455
  • 1
  • 17
  • 33

3 Answers3

0

It seems that it is not as easy as in Mercurial :) especially if the repo is shared with others and they also need to keep this file (after it is removed from tracking and ignored, the first svn update will delete it).

See this answer for detailed instructions: SVN: Ignoring an already committed file

Community
  • 1
  • 1
Christophe Muller
  • 4,850
  • 1
  • 23
  • 31
0

I found a way to achieve this by fiddling around. Neither of these is ideal - can anyone improve on this?

Option 1: Delete in SVN repository, then resolve

  • Navigate to Window -> Open Perspective -> SVN Repository Exploring to view the repository.
  • Right-click on the file and press Delete...
  • Navigate back to Spring perspective
  • Right-click on the file and press Team -> Show Tree Conflicts
  • In SVN Tree Conflicts perspective, right-click and press Resolve... to explicitly accept the repository deletion
  • In Spring perspective, right-click on the file and press Team -> Add to svn:ignore

Option 2: Delete locally, then resolve

  • Move file somewhere else on local
  • Commit to repository
  • Copy file back into tracked project
  • Add to svn:ignore
Lydia Ralph
  • 1,455
  • 1
  • 17
  • 33
0

Run svn delete <path> --keep-local in your working and then svn commit the change.

The first command will schedule the delete of the file in repository, however it won't touch it in your working copy making the file unversioned. You can add the file to ignores afterwards.

bahrep
  • 29,961
  • 12
  • 103
  • 150