Something else I want to mention is that there
are many different version control systems but we can classify
them normally in two main types: centralized VCS's and
decentralized VCS's. So what is the difference between these two?
Let's use again our friends Janet and Brett.
In the case of a centralized version control system
there is a single centralized, as the name says,
repository. On which they are commiting their files. So when
Janet commits a file. The file will go from
her local working directory to the repository, and the same
will happen to Brett. The decentralized system is a little
more interesting because in this case, they will both have
sort of a local repository in which they can commit
their changes. So they can commit changes without the other
users of the VCS being able to see these changes.
And when they're happy with the version. And when they're
ready to release the version, they can push it to a central
repository. And at that point, it will become available to the other
users of the repository. To the other users of the VCS. There
are several advantages in a distributive
system. I'm just going to mention a few,
because there are really many. One is the fact of having this
local version. If you used VCS before, I'm sure you've been in
the situation in which you want to kind of take a snapshot
of what you have. But you don't want that snapshot to be available
to the other users. Because it's still not ready to be
released, to be looked up. If you're using a centralized system,
there's really no way you can do that, unless you make
a local copy, which is something we said you don't want
to do. With a distributor, with a decentralized VCS you can
commit your local changes here, in your local repository, and you
can push them to the central repository only when you're ready.
Another big advantage, is that you can use multiple remote repository.
In fact, centralized is not the right name for this
one. This is just a remote repository, and I can have
more than one. For example, Brad might want to push
to another remote repository. As well. For instance, this could be
a repository where the files are accessible for wider distribution.
Imagine developing a software system in which a team is sharing
internal versions, and then only some of these versions are actually
pushed to the repository that is seeable to the whole world.