Git on the other hand stores data as a stream of snapshots. To save disk space, any duplicated or unchanged content is stored as links to previous versions. This makes Git more like a mini file system. This has some benefits in terms of speed and performance.
With Git, most operations become local, by this we mean they only require local files and resources. This differs from most CVCS's (Centralised Version Control Systems) where network latency becomes an overhead. Git gives you the entire history of the project on your local disk.
There are several advantages here. Operations like browsing file history are instantaneous. Doing file comparisons is faster without remote server overheads. If you are offline, you can still work effectively.
Git uses SHA-1 hash for checksum to ensure integrity. You cannot therefore change the contents of a file or directory without Git being aware. Information lost in transit or corrupted will therefore be detected by Git. The SHA-1 hash is a 40 character string with a bunch of hexadecimal characters (0-9, a-f). Git stores everything in its database using this hash.
No comments:
Post a Comment