Version Control(Git)

Terms definition.
1. Version Control System (VCS)
 This is a software that helps software developers to work together and maintain a complete history of their work.
2. Local Repository
Every VCS tool provides a private workplace as a working copy. Developers make changes in their private workplace and after commit, these changes become a part of the repository
3. Working Directory and Staging Area or Index
The working directory is the place where files are checked out

Advantages of Git

a) Free and open source
Git is released under GPL’s open source license. It is available freely over the internet. You can use Git to manage propriety projects without paying a single penny. As it is an open source, you can download its source code and also perform changes according to your requirements.
 b) Fast and small
As most of the operations are performed locally, it gives a huge benefit in terms of speed. Git does not rely on the central server; that is why there is no need to interact with the remote server for every operation performed. The core part of Git is written in C, which avoids runtime overheads associated with other high-level languages. Though Git mirrors entire repository, the size of the data on the client side is small. This illustrates the efficiency of Git at compressing and storing data on the client side.
 c) Implicit backup
The chances of losing data are very rare when there are multiple copies of it. Data present on any client side mirrors the repository, hence it can be used in the event of a crash or disk corruption.
 d) Security
Git uses a common cryptographic hash function called the secure hash function(SHA1), to name and identify objects within its database. Every file and commit is check-summed and retrieved by its checksum at the time of checkout. It implies that it is impossible to change a file, date, and commit message and any other data from the Git database without knowing Git.
 e) No need for powerful hardware
In the case of CVCS, the central server needs to be powerful enough to serve requests of the entire team. For smaller teams, it is not an issue, but as the team size grows, the hardware limitations of the server can be a performance bottleneck. In a case of DVCS, developers don’t interact with the server unless they need to push or pull changes. All the heavy lifting happens on the client side, so the server hardware can be very simple indeed.
 f) Easier branching
CVCS uses cheap copy mechanism. If we create a new branch, it will copy all the codes to the new branch, so it is time-consuming and not efficient. Also, deletion and merging of branches in CVCS are complicated and time-consuming. But branch management with Git is very simple. It takes only a few seconds to create, delete, and merge branches.

Using git

git init

Before doing anything, git init should be the first command, the command is used to initialize your repository

git status

Git status command is used to check for the history of events on your repository

git add

Git add is a command used to add files into your repository

git commit

Git commit is used to commit changes in your repository

The above commands are very basic to get u started in git, i recommend you visit for more detailed information.

Nice time

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.