Pagine

Friday 28 October 2016

SVN tutorial n 11 - import

The svn import command commits an unversioned file or tree into the repository.
The synopsis is:
 svn import -m "initial commit" <local_path> <url_svn_repository>
If <local_path> is omitted, “.” is assumed (default value).
After importing data, note that the original tree (<local_path>) is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree.

Examples:

This imports the local directory myproject into trunk/project in your repository. The directory trunk/project need not exist before you import into it—svn import will recursively create directories for you.
 svn import -m "initial commit" myproject https://mysvnrepo/svn/trunk/project
Adding         myproject/file.txt
…
Transmitting file data .........
Committed revision 30.
Be aware that this will not create a directory named module-a in the repository. If that's what you want, simply add module-a to the end of the <url_svn_repository>:
 svn import -m "initial commit" module-a https://mysvnrepo/svn/trunk/project/module-a
Adding         module-a/file2.txt
…
Transmitting file data .........
Committed revision 32.

No comments:

Post a Comment