svn add - excluding the files directory

I use bash script that I found on GotDrupal for adding and removing files from svn using a regular expression. I normally use the command for simple tasks, like the ones shown in the video on GotDrupal, but today I used a regular expression that took me a few minutes to get working.

I wanted to add everything in my local development environment to the svn repository except for the files directory. The first thing I did was add my Drupal install non recursively, then with my handy svngrep command added the rest of the directories, except for the files directory.


svn add -N drupal
cd drupal
svngrep '^\?.*[^( files$)].*$' add

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options