본문 바로가기
IT/linux

svn add commit 전 취소 방법

by 어느해겨울 2022. 1. 5.

svn add commit 전 취소

- linux, ubuntu, svn, add, commit, revert, 설명, 예제

 

svn add 상태일 때 원상태로 되돌리는 방법은 svn revert 명령을 사용하면 된다.

 

예제

- test_file 생성 > svn st > svn add > svn revert > svn st 확인

muabow@muabow-WorkSpace:~/project/$ touch test_file
muabow@muabow-WorkSpace:~/project/$ svn st
?       test_file
muabow@muabow-WorkSpace:~/project/$ svn add test_file
A         test_file
muabow@muabow-WorkSpace:~/project/$ svn revert test_file
다시 복원함 'test_file'
muabow@muabow-WorkSpace:~/project/$ svn st
?       test_file
muabow@muabow-WorkSpace:~/project/$

 

svn revert를 통해 svn status 가 A > ? 변경된 것을 확인할 수 있다.

 

 

만약 하위 폴더가 존재 하는 경우에는 옵션으로 --depth infinity 를 사용하면 된다.

 

예제

svn revert * --depth infinity

 

linux svn 옵션 목록

svn --help
usage: svn <subcommand> [options] [args]
Subversion command-line client.
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules
  or 'svn --version --quiet' to see just the version number.

Most subcommands take file and/or directory arguments, recursing
on the directories.  If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.

Available subcommands:
   add
   auth
   blame (praise, annotate, ann)
   cat
   changelist (cl)
   checkout (co)
   cleanup
   commit (ci)
   copy (cp)
   delete (del, remove, rm)
   diff (di)
   export
   help (?, h)
   import
   info
   list (ls)
   lock
   log
   merge
   mergeinfo
   mkdir
   move (mv, rename, ren)
   patch
   propdel (pdel, pd)
   propedit (pedit, pe)
   propget (pget, pg)
   proplist (plist, pl)
   propset (pset, ps)
   relocate
   resolve
   resolved
   revert
   status (stat, st)
   switch (sw)
   unlock
   update (up)
   upgrade

Subversion은 형상관리를 위한 도구입니다.
더 상세한 정보를 위해서는 http://subversion.apache.org/ 를 방문하세요

끝.

 

 

댓글