Can we commit individual files?

Hello, we use CVS, and development happens regularly. Most of the time I work with only one to three files. Do I still have to commit all changes to the folder? Is it possible to select files that need to be committed and not allow CVS to commit files that are still under development?

Like in file 1, file 2 and file 3 .... I work with file 1 for most of the day, I check the logs and have some problems in file 2, so I make a quick change in file 2 and decide to commit. But the code in the file is still under development and only wants to commit the changes made to file2. Is it possible?

+3
source share
3 answers

Yup, just use

cvs commit file2
+6
source

Taken from http://cvsbook.red-bean.com/cvsbook.html

"Here we commit one file by name and two by output:"

 floss$ cvs commit -m "print goodbye too" hello.c
 Checking in hello.c;
 /usr/local/cvs/myproj/hello.c,v  <--  hello.c
 new revision: 1.2; previous revision: 1.1
 done
 floss$ cvs commit -m "filled out C code"
 cvs commit: Examining .
 cvs commit: Examining a-subdir
 cvs commit: Examining a-subdir/subsubdir
 cvs commit: Examining b-subdir
 Checking in a-subdir/subsubdir/fish.c;
 /usr/local/cvs/myproj/a-subdir/subsubdir/fish.c,v  <--  fish.c
 new revision: 1.2; previous revision: 1.1
 done
 Checking in b-subdir/random.c;
 /usr/local/cvs/myproj/b-subdir/random.c,v  <--  random.c
 new revision: 1.2; previous revision: 1.1
 done
 floss$
+1
source

As an alternative to what others have said (which is the right answer), instead of restraining yourself to make changes, why not create a branch for the experimental material?

0
source

Source: https://habr.com/ru/post/1756819/


All Articles