# How to add all files and directories to svn with the svn add command?

I want to use this simple command, which is already recursive:

svn add *


The problem is that the shell (ash) does not expand the asterisk to hidden files, i.e. files whose name begin with a dot.

-

## 2 Answers

AFAIK, you just can to use:

svn add directory


Every file and subdirectory will be added correctly.

-

As far as I know, neither bash nor tcsh do that either. Simply use svn add * .* then.

-
svn: Skipping argument: '.svn' ends in a reserved name svn: warning: '.' is already under version control svn: Path '..' ends in '..', which is unsupported for this operation # svn status ? .test –  dash17291 Aug 19 '12 at 15:37
@dash17291: svn add * in a directory which already is a working copy usually results in SVN complaining about items already added. Same happens when you "manually" try to add the very same file a second time. –  Shi Aug 19 '12 at 16:03