svn import | Subversion Import Command
If you need the contents of a local directory tree version controlled you use the import command. You make the folder known to the version controller, visible to repository’s readers, and writeable to its committers.
You want to version manage a directory on the local filesystem. So ask yourself
- Is the Subversion client installed on your Windows or Linux machine?
- Do you know the username/password for repository commits.
- Your local (overarching) folder will [NOT] be created in the repository.
- Go to the directory owning the folder you want to import.
- Do an ls (Unix) or dir (windows) and your “to be imported” directory must be listed.
- Add the [NAME] of the over-arching folder to the end of the repository URL.
- If you don't the folder's contents will be MESSILY littered in the VCS folder name (at the end of the URL).
- Run the Command
- Browse to the repositoryh URL to find the new folder.
svn import -m "purpose (to what end) log" <<local-not-imported-folder-name>> http://<<hostname>>>/assets/to-be-created-repository-folder
After The Event
- Everything UNDER the local folder name is pushed in.
- Those who can “read” the repository can see the new folder tree you’ve imported.
- Those who can “wite” to the repository can checkout alter and commit to the newly imported folder.
Other Command Examples
With Username and Password
svn import -m "purpose (to what end) log" <<path-to-local-folder>> http://<<hostname>>>/assets/to-be-created-repository-folder --username "user" --password "pass"