Git good…A bit about Git
Git is one of the most popular free and open source distributed Version Control Systems(VCS) developed in 2005 under the leadership of Linus Torvalds. Some of the main characteristics of git are:
- Being a distributed VCS, git makes each local copy of the code “whole” — code as well as the full history of all the changes. Even if there is a failure of the central server, one of the local copies can act as the main repository.
- Conceptually, Git works with snapshots and not changes. Whenever changes are committed, Git takes a screenshot of the files at that instant and stores a reference to that snapshot. Even adding a single new line to the code creates a new “blob” almost the same size as the original file and not just an increment to the original file. Compared to this, many other VCS store the code as files and series of changes (deltas) to these files over time.
- Data is check-summed using SHA-1 hash before storing — this prevents any undesired changes to the data or the metadata.
To better understand git, we can think of it to be made up of three components:
Git directory/repository — stores all the files (metadata and objects) using SHA-1 hash. Making local copies of this repository which includes all the data and history of changes, is what makes git a distributed VCS.
Working directory — Newly created file or checked out files ready for modifications
Staging area — Contains the files and information to be committed.
When you create a new file or modify an existing file, the files are in the working directory. Once you are satisfied with the changes, you “stage” the file, moving it to the staging area and ready for a commit. Issuing a commit saves the staged changes in the git repository along with the history of the change. If this repository is copied to another machine, the cope will include the changes as well as the history of the change.
Git scores higher compared to other VCS with respect to performance, security, flexibility, and ease of use. Being open source also gives a few advantages to git — vast community of support, free to use, proper documentation. All these factors justify the popularity of git.
Gitstorage is the perfect device for people developing new software or considering alternatives to cloud git repositories.