Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
...
If you really want to experiment with some of the more advanced commands (branching, merging, copying, etc.) you might think about setting up your own test repository as doing this kind of stuff on an actual production repository if you are just testing or fooling around is not recommended!polite.
Checkout a Folder from SVN
...
No Format |
---|
svn co svn://example.org/repo/some/dir |
svn:// is the protocol ( for talking to communicating with the SVN server).
example.org is the host name of the SVN server.
repo is the name of the SVN repository (SVN Servers servers can have multiple repositories).
some/dir is a folder in the repository.
You could also may checkout the entire repository.
...
No Format |
---|
svn rm rel/path/to/file1 rel/path/to/file2 |
The deletion will occur in the repository when you commit.
When you execute the rm command, Subversion will not by default leave a local copy of the file and so will delete it immediately!
...
This command is used to commit your local changes to the repository, including deletions, changes and additions which have been done on the working copy.
No Format |
---|
svn commit -m "committing some stuff" path/to/file1 optional/path/to/file2 |
Usually it is good to include a list of files that should be specifically affected by the commit. Otherwise, you may inadvertently commit changes.
Files must be explicitly added or deleted in order to be included in a commit using the add or rm sub-commands (described above).
Any changes to files that SVN knows about in the working copy will be included in the commit automatically.
Similar to how a file system works, files can be copied to directories. Similar to how a file system works, files can be copied. In Subversion, this will essentially " fork " the file from the source version of it where it can be independently changed.
Here is an example of making a copy of a file with a new name.
...
In both cases, you will need to commit in order for these changes to be pushed to the repository.
Warning | ||
---|---|---|
| ||
Merging is an advanced command. Always use '--dry-run' to check the results of a merge before executing it. |
...
No Format |
---|
svn cp -m "Creating development branch." ^/projects/java/trunk ^/projects/java/branches/my-dev-branch |
This command can also be used to make copies of files.
No Format |
---|
svn cp -m "Copying my file." myfile.java myfile_v2.java |
Or to copy a file into a folder.
No Format |
---|
svn cp -m "Copying my file." myfile.java some/dir |
When copying a file into a folder, the folder must already exist in the repository (or have been added using the add command)Now my-dev-branch will be a complete copy of trunk at the time when it was copied.
Tagging is actually performed by using the copy command.
...