Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn:ignore 'file' is not under version control

Tags:

svn

I know that there are a quite a few questions on this out there however none of them make sense so I was hoping that someone could dumb it down for me, cause I am just not getting it.

I have a project (rails) and I want to ignore the SQLite files (among others) from the repository. I have tried adding the files and then ignoring with

$ svn propedit svn:ignore "development.sqlite3" db    
svn: 'development.sqlite3' is not under version control

$ svn propedit svn:ignore "*.sqlite3" db    
svn: '*.sqlite3' is not under version control

I have tried removing the files and trying the same, and many other combinations and I simply cannot get it to work. I dumped the current build and pulled it down again just to make sure that I was working with a clean copy of the project and no change.

I know that I am missing something, probably something simple, so if someone out there could give me a hand I would appreciate it.

thanks patrick

like image 744
Patrick Avatar asked Mar 21 '11 06:03

Patrick


People also ask

How do I ignore files in svn?

Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.

Is not under version control?

The error means that you've tried to commit a file that is not under version control. You should svn add it first. However, there is a chance that you made some unintentional changes in your working copy. You must do svn update and analyze your local uncommitted modifications with svn status .

How do I find my svn ignore list?

Use: svn pg -R svn:ignore . See Stack Overflow question How do I view all ignored patterns set with svn:ignore recursively in an SVN repository? This shows the relative path with all files ignored by SVN in a working copy of a folder structure.


2 Answers

svn propedit does not take the filename on the command line. It lets you edit the property using whatever editor you have configured in your environment. You want to run

svn propedit svn:ignore db

which will open your editor, then you can add development.sqlite3 or *.sqlite3 or whatever you want to that "file". It will be changed in your working copy when you exit the editor, and will be updated in the repository the next time you commit the db directory. You can also set the value using the propset command:

svn propset svn:ignore '*.sqlite3' db

But, this only lets you set it the first time, and only to a single filename. It will overwrite any previous value of svn:ignore. If you want to ignore multiple files or patterns, you have to use propedit, so I just use that all the time.

like image 117
archbishop Avatar answered Oct 03 '22 03:10

archbishop


have you tried?

svn delete file_or_dir_name 

and then commit

like image 40
Heisenbug Avatar answered Oct 03 '22 02:10

Heisenbug