svn: which files will commit - how to ignore them
I've got the following output from svn status
$ svn status
M .
? tmp
M cron
M cron/alerts.php
M Impact.php
M logs
M conf
M conf/db.ini <-- Let's talk about this file
M conf/impact.xml
In my local working copy, I've modified the conf/db.ini
file to connect to my dev DB server. Since these changes 开发者_开发问答are specific to me, I don't want them to go back up to the repository when I commit.
I've done svn propedit svn:ignore conf
and listed db.ini
, but when doing an svn status
I see that file still has an "M"
in the first column, making me think that it will still be committed. Am I correct here? If so, what do I need to do to avoid committing my local changes to that file?
In looking a little further, I've also found that you can manually create a changelist, and add the files you want to commit to the change list (works well when you change, say 5 files, but only want to commit the changes to 3 of them). When you commit, you simply commit specifying the name of the custom-created changelist, and you're done.
So, in my case. If I wanted to commit ONLY the changes to 'Impact.php' I could do the following:
$ svn cl impact-changes Impact.php
$ svn commit --changelist impact-changes -m "My commit message."
My guess is that you have added the db.ini file to the repo, else it would have shown a ? next to it and not a M. So, try backing up your db.ini, remove it from the SVN repo and then try svnstatus
精彩评论