views:

79

answers:

3

I'm always having this problem and I didn't found the answer yet really.

Let's say you setup your partner setups a new project and imports every single file of the it, including those ones related to enviroment configuration which should not be under source control during the development (ie. the database config file).

So then I checkout the project for the first time and obviously I have to change the database config file to make it work. But then that file is marked as changed and will be show under the commit list, so is there a way to "unversion-it" at that point?

I tried "Delete and add to ignore list", but that will just mark the file to be deleted and once I commit, my partner will update the project and found that his db config file was deleted.

So how is really the way to work with those environment-dependent files? (Supposing you've already add them to the repo). You just change the file locally and keep unchecking it on every commit?

Thanks, and sorry if this is a silly question.

+6  A: 

I think many applications have a db.conf.sample that they put in version control, and then people rename it to db.conf which is ignored on the version control.

webdestroya
+1, that is the solution making most sense in almost all cases.
Doc Brown
This is a Rails application and has database.yml, which is the file we want to ignore, there's no .sample or anything like that.
emzero
Sure, this solution is good, if you rename database.yml to database.yml.sample BEFORE importing the project, but this is not the case. Anyway I'm giving you +1 cause this sound a nice workaround for future projects.
emzero
@emzero - in that case, you should copy the file to something, and delete the original from SVN repo. Have everyone update, and then copy the file back and ignore it.
webdestroya
+1  A: 

Tell your partner to backup the file and then use the Delete option from the context menu. It will be then also deleted in your copy and will not be versioned anymore.

dark_charlie
Yes, I could do that, but I was looking for a less cumbersome solution.
emzero
Sounds like you need to talk about how to import files, and which files to import. You shouldn't ever version files that are easily generated or that don't change. Just delete (svn rm) them before you commit. Can you explain more about this problem? It sounds like one of you is just versioning files you don't need to put into VCS.
Joel J. Adamson
A: 

It's a pain in the backside, but there's always this. I've not use subversion much until recently, so I hope there's a better solution. It does give me what you want, though.