Version Control System (VCS)
Centralized Version Control System (CVCS)Ex:
CVS
,
Subversion
,
Perforce
We may encounter the errors/bugs in the
center.When errors occur, we only last the
Individual Snapshots
on local devices.Distributed Version Control System (DVCS)Ex:
Git
,
Bazaar
Client not only copy codes, but the complete image of repo and history.
Git History
Use
Distributed Version Control System
:
BitKeeper
(2002-2005)Advantages of Git:QuickSimpleNon-linear Distribution (Allow lots of branches)Maintain the large-scale project:
Linux Kernel
What's Git
Git
is similar to other VCS like
Subversion
, but treat data in a different way.Most VCSs store data with
Document-List
based (
CVS
,
Subversion
,
Perforce
,
Bazaar
, it's also called
Delta-based
VCS.
Git
treat documents as series of snapshots:At each
staged
, it would create a snapshot based on current files, and store the index of snapshot.If files aren't changed,
Git
would create a
link
, pointing to last-stored files.A.K.A
Git Flow
Local Machine
Most instructions are accessed with local machine and resources.Thus, we have the complete history of the repo.
Advantages of Git: Integrity
Git
would create/generate the
checksum
before storing data.Standard of hash:
SHA-1, SHA-256.
Git
store data with index based on the checksum of docs contents, not the name of docs.
The status of Git
ModifiedStagedCommitted