【SVN命令整理】

 

(在命令行下經過 svn help xxx 來查看xxx命令的文檔)html

1. add (將文件加入版本管理)

  Put files and directories under version control, scheduling them for addition to repository. They will be added in next commit.svn

  usage: add PATH...this

 

2. blame (praise, annotate, ann) (顯示指定文件的修訂版本&做者信息)

  Output the content of specified files or URLs with revision and author information in-line.spa

  usage: blame TARGET[@REV]...命令行

  If specified, REV determines in which revision the target is first loogked up.orm

 

3. cat (顯示指定版本文件的內容)

  Output the content of specified files or URLs.htm

  usage: cat TARGET[@REV]...blog

 

4. changelist (cl) (對指定文件進行分組)

  Associate (or dissociate) changelist CLNAME with the named files.
  usage: 1. changelist CLNAME PATH...
       2. changelist --remove PATH...ci

 

5. checkout (co) (從代碼庫中拉取代碼)

  Check out a working copy from a repository.rem

  usage: checkout URL[@REV]... [PATH]

  If specified, REV determines in which revision the URL is first looked up.

 

6. cleanup (清理工做目錄)

  Recursively clean up the working copy, removing write locks, resuming unfinished operations, etc.

  usage: cleanup [WCPATH...]

 

7.  commit (ci) (提交)

  Send changes from your working copy to the repository.

  usage: commit [PATH...]

 

8. copy (cp) (拷貝文件)

  Copy files and directories in a working copy or repository.

  usage: copy SRC[@REV]... DST

 

9. delete (del, remove, rm) (刪除文件)

  Remove files and directories from version control.

  usage:  1. delete PATH...
      2. delete URL...

 

10. diff (di) (顯示差別)

  Display local changes or differences between two revisions or paths.

  usage:   1. diff

      2. diff [-c M | -r N[:M]] [TARGET[@REV]...]

      3. diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...]

      4. diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]

      5. diff OLD-URL[@OLDREV] NEW-PATH[@NEWREV]

      6. diff OLD-PATH[@OLDREV] NEW-URL[@NEWREV]

 

11. export (導出不帶版本信息的目錄樹)

  Create an unversioned copy of a tree.

  usage:  1. export [-r REV] URL[@PEGREV] [PATH]
      2. export [-r REV] PATH1[@PEGREV] [PATH2]

 

12. help (?, h) 

  Describe the usage of this program or its subcommands.

  usage: help [SUBCOMMAND...]

 

13. import (導入目錄到庫中)

  Commit an unversioned file or tree into the repository.  

  usage: import [PATH] URL

 

14. info (顯示指定文件的svn信息)

  Display information about a local or remote item.

  usage: info [TARGET[@REV]...]

 

15. list (ls) (顯示文件列表)

  List directory entries in the repository.

  usage: list [TARGET[@REV]...]

 

16. lock (鎖定文件)

  Lock working copy paths or URLs in the repository, so that no other user can commit changes to them.

  usage: lock TARGET...

 

17. log

  Show the log messages for a set of revision(s) and/or path(s).

  usage:  1. log [PATH][@REV]

      2. log URL[@REV] [PATH...]

 

18. merge (合併)

  Merge changes into a working copy.

  usage:  1. merge SOURCE[@REV] [TARGET_WCPATH] (the 'complete' merge)

      2. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH] (the 'cherry-pick' merge)

      3. merge SOURCE1[@REV1] SOURCE2[@REV2] [TARGET_WCPATH] (the '2-URL' merge)

 

19. mergeinfo (顯示合併相關信息)

  Display merge-related information.

  usage:  1. mergeinfo SOURCE[@REV] [TARGET[@REV]]

      2. mergeinfo --show-revs=WHICH SOURCE[@REV] [TARGET[@REV]]

 

20. mkdir (建立文件夾)

  Create a new directory under version control.

  usage:   1. mkdir PATH...

      2. mkdir URL...

 

21. move (mv, rename, ren) (移動)

  Move (rename) an item in a working copy or repository.

  usage: move SRC... DST

 

22. patch (打補丁)

  Apply a patch to a working copy.

  usage: patch PATCHFILE [WCPATH]

  參考:巧用svn create patch(打補丁)方案解決定製版需求

 

23. propdel (pdel, pd) (刪除屬性)

  Remove a property from files, dirs, or revisions.

  usage:   1. propdel PROPNAME [PATH...]

      2. propdel PROPNAME --revprop -r REV [TARGET]

 

24. propedit (pedit, pe) (編輯屬性)

  Edit a property with an external editor.

  usage:  1. propedit PROPNAME TARGET...

      2. propedit PROPNAME --revprop -r REV [TARGET]

 

25. propget (pget, pg) (打印屬性)

  Print the value of a property on files, dirs, or revisions.

  usage:  1. propget PROPNAME [TARGET[@REV]...]

      2. propget PROPNAME --revprop -r REV [TARGET]

 

26. proplist (plist, pl) (顯示全部屬性)

  List all properties on files, dirs, or revisions.

  usage:  1. proplist [TARGET[@REV]...]

      2. proplist --revprop -r REV [TARGET]

 

27. propset (pset, ps) (設置屬性)

  Set the value of a property on files, dirs, or revisions.

  usage:  1. propset PROPNAME PROPVAL PATH...

      2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]

 

28. relocate (重定位)

  Relocate the working copy to point to a different repository root URL.

  usage:  1. relocate FROM-PREFIX TO-PREFIX [PATH...]

      2. relocate TO-URL [PATH]

 

29. resolve (解決衝突)

  Resolve conflicts on working copy files or directories.

  usage: resolve [PATH...]

 

30. resolved (移除衝突狀態)

  Remove 'conflicted' state on working copy files or directories.

  usage: resolved PATH...

 

31. revert (回滾)

  Restore pristine working copy state (undo local changes).

  usage: revert PATH...

 

32. status (stat, st)

  Print the status of working copy files and directories.

  usage: status [PATH...]

 

33. switch (sw)

  Update the working copy to a different URL within the same repository.

  usage:   1. switch URL[@PEGREV] [PATH]

      2. switch --relocate FROM-PREFIX TO-PREFIX [PATH...]

  參考:SVN switch 用法詳解

 

34. unlock (解鎖)

  Unlock working copy paths or URLs.

  usage: unlock TARGET...

 

35. update (up) (更新)

  Bring changes from the repository into the working copy.

  usage: update [PATH...]

 

36. upgrade (升級)

  Upgrade the metadata storage format for a working copy.

  usage: upgrade [WCPATH...]

相關文章
相關標籤/搜索