본문 바로가기

도구의발견

CVS Command Line Reference

CVS Command Line Reference


일반적인 CVS command :

% cvs general-options command-name command-specific-options filename

Help

cvs --help-commands
모든 명령어 보여주기
cvs --help-options
모든 command에 적용되는 'global' 옵션들을 보여준다. 이 기능중에서 가장 유용한 것은 아무것도 실행하지 않고 디스크의 파일을 변경하는  -n 이다. 하지만 무슨일을 할것인지는 보여준다.
cvs -H command
지정된 커맨드의 help를 보여준다.


Task Reference

Action How to do it.
Repository와 로컬파일들의 동기화를 시킨다. 아직 check in 되지 않은 파일중에서 무엇이 수정되었는지 알수 있다.
cvs update
(sample)
지정된 파일의 revision history를 보여준다.
cvs log filename
(sample)
한 revision의 comment를 보연 준다.
cvs log -r1.5 filename
이전 버전의 파일과 현재 파일과의 차이 점을 보여준다.
cvs diff filename
이미 체크인 된 두 버전의 파일간의 차이를 보여준다.
cvs diff -r1.4 -r1.7 filename
(sample)
누가 파일을 수정했는지 보여준다.
cvs annotate filename
(sample)


누가 코드를 잘못짜서 커밋했는지 찾을때 유용하다.

Repository에 새로운 파일을 추가한다. Create the file
cvs add filename
cvs commit -m "Initial Revision" filename
Repository에 새로운 바이너리 파일 추가 Create the file
cvs add -kb filename
cvs commit -m "Initial Revision" filename

A "binary file" won't have CVS keyword expansion performed on it.

프로젝트에 새로운 디렉토리 추가 하기 cd to the directory's parent cvs add directoryname
파일의 변경사항을 Repository에 반영
cvs commit -m "check-in comment" filename
If your check-in comment is more than one line, leave off the the -m option and use the editor that is brought up.
가장 최근에 check in 된 버전으로 rollback Remove the file
cvs update filename
모든 디렉토리 트리를 새로운 프로젝트에 추가 cdto the project directory
cvs import -m "project name" directory "ArsDigita" "initial-development"

Note that this does not change directory into a CVS-controlled tree. You'll need to remove the tree and check it out.

프로젝트의 모든 것들을 check out
cvs checkout project-name
Label a tree for concurrent development cd to the parent directory of your tree
cvs tag -R -b labelname

This will use the currently-checked-out versions of the files as they exist in your directory tree.

The -b argument means that this tag is a "branch" tag, meaning that someone can check out a new tree based on this tag and do development.

If you omit the -b, the label will be a "sticky" tag, meaning that someone won't be able to check in new changes under that label. See the notes on Labeling and Branching

label에 따라 check out
cvs checkout -r labelname projectname
If labelname was created as a "branch" tag, then you can check in changes without affecting anyone using the development tip.

Otherwise files are considered "sticky" and changes cannot be checked in.

파일이 add 되고 난후 바이너리 파일로 처리될 수있도록 변경 cvs admin -kb filename

A "binary file" won't have CVS keyword expansion performed on it.



유익한 글이었다면 공감(❤) 버튼 꾹!! 추가 문의 사항은 댓글로!!