Is there a simple command to add a directory and all files underneath it to svn?
I have tried svn add directory which makes sense to me but this doesn’t work as expected. I have googled it and there are solutions which all appear a bit long-winded for something so simple.
What would be the standard way of doing this?
svn add directoryonly works if the directory hasn’t been added already. Adding all new files is not standard operation in svn world. Git does this but that’s sidetracking.You can often get by with
svn add directory/*but it misses new files in existing subdirectory. So:If you really need to add any file anywhere in the directory hierarchy this one liner will set-up an alias for you to do this:
Put it into your .profile and you’ll have easy access to it any time. 🙂