- Git is an open source version control system. Git is developed and maintained by the creator of the Linux kernel.
- It stores complete files each time the user commits his changes, making recovery and version-diffing reliable, responsive, and simple. This is in contrast to other version control systems which store complete versions as “Deltas” or descriptions of the changes between versions of a file. If a file has not changed between commits then Git simply links to the last changed version.
- It is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
- In software development, Git is a distributed revision control and source code management system with an emphasis on speed. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Git is free software.
- Install Git:
sudo apt-get install git-core
- Verify the installation:
$which git
/opt/local/bin/git
- Checking Your Settings:
git config –list
- Configure your username using the following command:
git config –global user.name “FIRST_NAME LAST_NAME”
- Configure your email address using the following command:
git config –global user.email “MY_NAME@example.com”
- Git stores each newly created object as a separate file. Although individually compressed, this takes a great deal of space and is inefficient. This is solved by the use of “packs” that store a large number of objects in a single file (or network byte stream), delta-compressed among themselves.
- The process of packing the repository can be very computationally expensive. Git does periodic repacking automatically but manual repacking is also possible with the git gc command.