Here is the problem:
Loop through all files and subfolders copying all contents EXCEPT .svn into another location.
I can think of some pretty hairy ways to do this but am wondering if anyone knows a real simple function to save me a bit of time? Thanks.
You can remove all dot files in a folder using find and rm . It searches for all dot files in the given folder, passed the results to rm which deletes it.
The find command returns a list of all the subfolders matching “. svn”, and this is then piped to the rm command to recursively delete the directory. Running rm using the full path will remove the confirmation prompt, and the “rf” arguments will recursively delete any folder contents.
In particular, each directory in your working copy contains a subdirectory named . svn, also known as the working copy's administrative directory. The files in each administrative directory help Subversion recognize which files contain unpublished changes, and which files are out of date with respect to others' work.
The easiest way to copy files and folders from within a working copy is to use the right drag menu. When you right drag a file or folder from one working copy to another, or even within the same folder, a context menu appears when you release the mouse.
You can use the svn export
command. It will populate a target folder with the content of a working copy (or a revision on a repository).
Use rsync and the --exclude
switch.
… although in this specific case, the better option is svn export
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With