How do you add a folder without version control to a specific SVN location? I often start writing code and only after I have a few folders containing code files do I add it
Let's try.. It is working for me..
svn add * --force
If I correctly understood your use case, I suggest to try using svn add to put the new folder under version, see here. The following will add the new folder with files recursively under version control (if you are inside valid working copy):
svn add new_folder
svn commit -m "Add New folder to the project"
If you are not in a working copy, create it with svn checkout, copy new_folder there and do the above steps.
OR
Try svn import, see here; the following will create a new folder and upload files to the repository:
svn import -m "Import new folder to the project" new_folder \
http://SVN_REPO/repos/trunk/new_folder
Also note that:
After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree
Let's say I have code in the directory ~/local_dir/myNewApp
, and I want to put it under 'https://svn.host/existing_path/myNewApp' (while being able to ignore some binaries, vendor libraries, etc.).
svn mkdir https://svn.host/existing_path/myNewApp
cd ~/local_dir
svn co https://svn.host/existing_path/myNewApp
. If your folder has a different name locally than in the repository, you must specify it as an additional argument.svn st
will now show all your files as ?
, which means that they are not currently under revision controlsvn add
on files you want to add to the repository, and add others to svn:ignore
. You may find some useful options with svn help add
, for example --parents
or --depth empty
, when you want selectively add only some files/folders.svn ci
If the intention is adding the local/working copy to SVN, I used to do it the following way.
Note: I use the TortoiseSVN client and these steps assume that you already have the TortoiseSVN client installed.
I don't use commands. You should be able to do this using the GUI:
Visual Studio\Projects\{your project}
folder. Select OK.In Windows 7 I did this:
Done!