Svn
Jump to navigation
Jump to search
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
- ? - not under version control
- A - add
- C - file has textual conflicts from an update
- U - file was just updated
- D - file is scheduled for deletion
- M - file has local modificaations