A Version Control System helps you save your data in a more readable and logical way, and in-case you mess up you could restore a good version of your data.
Not just that; you could also concurrently share your data with the peers.
A best version control software is expected to have the below features:
Some of the popular version control system list:
Centralized Version Control System (CVCS):
Each developer’s change must go into the main trunk before it can be seen by others
Examples: CVS, SVN, ClearCase
De-centralized or Distributed Version Control System (DVCS):
In a DVCS every developer has its own repo and can choose when he wish to publish/share his changes.
Examples: BitKeeper, Mercurial, Git
Some high-Profile companies that switched to Git:
Linux, Google, Facebook, Microsoft, Twitter, LinkedIn, Netflix, Android, Amazon, Cisco, IBM, Intuit, Accenture, Apple IOS.
Everything in Git is check-summed before it is stored. SHA-1 hash, hexadecimal addresses. If you have a commit id, you could be assured not only that your project is exactly the same as when it was committed, but that nothing in that history was changed.
Diagram: The 3-tier architecture
Note: “Staging area” is further divided into “Staged” and “Un-staged” layers.
A hub to store all the project data/files and store each file’s revision history. Repositories can have multiple collaborators and may be either public or private.
Your local copy of the repository wherein you can modify the code and choose to publish it.
Saving a snapshot of the entire work directory with a unique id and a message and other details like who changed what file and when.
snapshot of your next commit .
Git computes the SHA-1 hash of a file with a hash value of 160 bits that uniquely identifies the contents of the file. Two files with identical contents will have the same hash value. Two files with different contents will have different hash values.
A clone is a copy of a repository that lives on your computer instead of on a website's server
A parallel or independent line of development. (In other words: A refname for the recent commit)
Your local default branch, master pointer points to the latest commit you make.
HEAD = snapshot of your last/latest commit.
The HEAD is a pointer to the most recent commit on the current branch. It is a hash value of the commit.
In other words: HEAD is a short name/reference to a SHA-1 of a commit id.
HEAD moves forward with each commit.
This is the version of something that is hosted on a server, most likely GitHub.com. It can be connected to local clones so that changes can be synced.
Official git download link: https://git-scm.com/downloads
Refer the link for documentation: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
--To check the git installed location:
$which git $/usr/local/bin/git
--View the installed git version:
$git --version $git version 2.19.0
How to use git:
Git can be used as a CLI (Command line tool) or as a GUI tool or as a git plugin.
This git version control tutorial focuses on using git as a CLI to get the best out of git commands.
Thanks for the post. I liked the way all the details have been provided!
Firstly thanks for providing this tutorial from this article I have gathered lots of information. I can say that whatever the information provided by knowledgeHut is more useful to know more about the git.