1. Basic Work Cycle
Update to the latest revision checkout, updateDo your work, change files add, remove, copy, moveExamine changes status, diff, revertMerge your work update, resolvedCommit commit -m "your comment"
2. Create a repository
svnadmin create /path/to/repo
3. The Working Copy
Get a working copy (= checkout) svn (checkout|co) [-r REV] url://repo/path/ path/to/projectUpdate your working copy *1 svn (update|up) [-r REV] [path/to/project]Add a file/directory to the project (!= import) svn add path/to/fileOrDirectoryCopy a file/directory and mark it as added svn copy path/to/fileOrDirectory path/to/newCopyRename/move a file/directory svn (move|mv|rename|ren) path/to/dir path/to/newDirDelete a file/directory svn (delete|del|remove|rm) path/to/fileOrDirectoryLock (or unlock) a file/directory for editing svn (lock|unlock) path/to/fileOrDirectoryCheck the status of your local file(s) *2 svn status [path/to/fileOrDirectory]Compare the status to the repo *2 svn status -u [path/to/fileOrDirectory]Do a diff of your file(s) and the repo svn diff [-r REV] [path/to/fileOrDirectory]Revert to last revision (last checkout or update) svn revert [path/to/fileOrDirectory]Resolve conflicts (after you reviewed them!) svn resolved [path/to/fileOrDirectory]Commit and create a new revision svn (commit|ci) [path/to/project] -m "your comment"Import unversioned files/folders *3 svn import path/to/original url://repo/path/Show a log svn log [-r REV] [path/to/fileOrDirectory]Concatenate a specific file svn cat [-r REV] path/to/file
Không có nhận xét nào:
Đăng nhận xét