4

I am using SVN, I want to know is it possible to untrack a file in SVN? I mean I want to keep changes locally, I don't want to commit those. Is there something similar to gitignore in SVN?

I know I can delete a file from repo using SVN DELETE --keep-local, this will keep the local copy of the file however it will delete the file from repo also. I want to keep this file in repo however want to make sure that it's changes doesn't get committed? Is there any way where I can assure changes made in the specific file don't get committed? Cause on several occasions I accidentally committed file with my changes which caused few problems.

Rahul
  • 2,189
  • 7
  • 40
  • 60

1 Answers1

1

usually this is done in SVN via so called Template files See here for more details: SVN template filese

The basic idea is, you use a config.xml.tmpl file for storing the defaults and copying it to config.xml in your project. The config.xml file will be ignored via svn's buildin ignore feature:

svn propset svn:ignore config.xml

If you make relevant changes to your config.xml(for example adding new database connections or other settings), you will need to update the config.xml.tmpl file as well

The result is that your config.xml file will never show up in the SVN modified file list and all people get the standard file on checkout as config.xml.tmpl. They copy the file and rename it to config.xml, modify the contents and can continue to work.

Peter Parker
  • 29,093
  • 5
  • 52
  • 80
  • 1
    This method is also part of the [official SVN FAQ](http://subversion.apache.org/faq.html#ignore-commit) – alroc Oct 16 '14 at 13:08
  • Thanks for your answer, using "propset" seems to be the way. I see your edits in answer and accept it as "Accepted answer" meanwhile I across this link http://stackoverflow.com/a/86052/974616 which has very good discussion going around for the same issue, thanks for your help – Rahul Oct 16 '14 at 13:22