Difference between revisions of "Svn"
Jump to navigation
Jump to search
(New page: ==General== * Unlike most version control systems, Subversion's revision numbers apply to entire trees, not individual files. * Recommended to have three directories in the repository ** a...) |
|||
Line 26: | Line 26: | ||
#* svn add | #* svn add | ||
#* svn delete | #* svn delete | ||
− | #* svn copy | + | #* svn copy foo bar = Create a new item bar as a duplicate of foo and automatically schedule bar for addition |
− | #* svn move | + | #* svn move foo bar = svn copy foo bar; svn delete foo |
+ | #* svn mkdir blort = mkdir blort; svn add blort | ||
# Examine your changes. | # Examine your changes. | ||
#* svn status | #* svn status |
Revision as of 19:00, 23 October 2009
General
- Unlike most version control systems, Subversion's revision numbers apply to entire trees, not individual files.
- Recommended to have three directories in the repository
- a trunk directory to hold the “main line” of development
- a branches directory to contain branch copies
- and a tags directory to contain tag copies.
Getting Started
- svn help <command>
- svn admin create /var/svn/newrepos
- svn import mytree file:///var/svn/newrepos/some/project -m "Initial Import"
- svn list file:///var/svn/newrepos/some/project
- svn checkout [repository location] {[new name of local directory]}
- svn checkout http://svn.example.com:9834/repos/trunk/some/project
- svn checkout file:///var/svn/repos
- svn checkout file://localhost/var/svn/repos
- svn commit button.c -m "Fixed a typo in button.c."
- svn update
- svn status --verbose
- svn log = display the history of changes to a file or directory
typical work cycle
- Update your working copy.
- svn update
- Make changes.
- svn add
- svn delete
- svn copy foo bar = Create a new item bar as a duplicate of foo and automatically schedule bar for addition
- svn move foo bar = svn copy foo bar; svn delete foo
- svn mkdir blort = mkdir blort; svn add blort
- Examine your changes.
- svn status
- svn diff
- Possibly undo some changes.
- svn revert
- Resolve conflicts (merge others' changes).
- svn update
- svn resolve
- Commit your changes.
- svn commit
Letters
- A - add
- U - update