I am running Subversion on Ubuntu. I have checked out the files for a project from an external server, done some changes on the files plus added some new files. Now I want to commit all the changes and the new files. However I modified the database configuration file to function with my local server so I don’t want to commit that change as it will mess things up. Because I made a lot of changes and added many new files I don’t want to commit the files one by one.
Share
So you have two problems, one, that you want to ignore a file that you’ve changed and two, that you want to add a bunch of files to subversion at once.
To solve the first problem you should use the previous suggestion of:
svn propedit svn:ignore <dir>and enter the name of the file into the editor that comes up (depending on the $EDITOR environment variable, this will most likely be emacs, vi, or nano by default). Make sure to save your changes to this file or it won’t help.
To solve the second problem, just loop over the files in your working copy via svn add in a bash equivalent terminal emulator – it won’t add something that’s already under version control and you can safely ignore the warnings it gives you. The better solution would be to write a quick script to check if something is in svn first and only add it if it’s not, but I think for what you’re doing it might be a waste of time. So, just:
svn add *from the root directory of your project and then, after checking
svn statusto make sure you’re happy with the changes,svn commit. The commit command will find all your changes (minus the ones in svn:ignore) and send them off to your repository.