Can we commit individual files?
Asked Answered
P

3

5

Hello we are using CVS and development takes place regularly. I work only on one-three files most of the time. Do I still have to commit all the changes in the folder?? Is it possible to select the files which have to be committed and not allow the CVS to commit files which are still in development??

As 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 problem in file 2, so I make a quick change in file 2 and decide to commit. But code in file is still in development and only want to commit changes made to file2. Is that possible?

Parenthood answered 27/7, 2010 at 21:50 Comment(0)
S
8

Yup, just use

cvs commit file2
Sextillion answered 27/7, 2010 at 21:52 Comment(0)
E
1

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

"Here, we commit one file by name and two by inference:"

 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$
Endocardium answered 27/7, 2010 at 21:52 Comment(1)
Meow, so would the syntax be cvs commit filename??Parenthood
N
0

Alternatively to what the others said (which is the correct answer), instead of holding back to commit changes, why not create a branch for the experimental stuff?

Neanderthal answered 28/7, 2010 at 5:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.