info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update vs. checkout


From: Matt Riechers
Subject: Re: update vs. checkout
Date: Mon, 29 Oct 2001 12:20:30 -0500

Tom Udale wrote:
> 
> We have just installed cvs and are finally starting to get a grip on how
> to use it.  One conceptual problem so far update vs checkout.  What is
> the real difference between the two?

You can't update a sandbox until you've checked it out. If you run 'cvs
checkout' on an already checked-out sandbox, it will revert and acutally do an
'update'. Update re-syncs your local sandbox with the repository, and checkout
is used to get a new sandbox. In a typical 'cvs development cycle', you would do
something like:

1. cvs checkout my_module -- get a new sandbox
2. [make some changes]
3. cvs update -- get any new changes from the repository, merging with local
changes if necessary
4. cvs commit -- save local changes to the repository
5. goto 2

You only need to 'checkout' if you want to start over fresh.

> I orginally thought that checkout
> was the only way to get newly added directories (and create the local
> CVS subdirectories).  Now, from this newsgroup, I see that there is
> update -d which seems very much like checkout.

'cvs update -d' behaves *like* checkout, in that it creates missing directories
in your sandbox, but that's where the conceptual similarities end.

> If you always wanted to
> update -d, is there any reason not to use checkout?  Is checkout simply
> a 'convienient' way of saying update -d (or perhaps with some other
> switches) or is there a more fundemental difference?
>
> Thanks,
> 
> Tom Udale

If you're still confused, take a look at Karl Fogel's book. It is an *excellent*
intro to CVS.

-Matt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]