"This is git tutorial designed for beginners and intermediate learners to master git concepts."
By Shivam
01/07/2025
This chapter will be about getting started with Git. We will begin by explaining some background on version control tools, then move on to how to get Git running on your system and finally how to get it set up to start working with. At the end of this chapter you should understand why Git is around, why you should use it and you should be all set up to do so.
VCS stands for Version Control System. It is a tool that helps manage and track changes to source code or other files over time. VCS is essential for software development and other projects where maintaining a history of changes, collaboration, and versioning is critical
Git, a powerful version control system, was created by Linus Torvalds in 2005 to manage the development of the Linux kernel. Before Git, Linux developers used a proprietary system called BitKeeper for version control. However, conflicts arose between the BitKeeper team and the Linux community, leading Torvalds to develop an open-source alternative.
The goal was to create a tool that was:
Today, it's the most popular version control system, powering platforms like GitHub, GitLab, and Bitbucket, transforming how teams collaborate on code.
Git is a version control system VCS designed to track changes in source code and collaborate efficiently with others. It is widely used for software development due to its speed, flexibility, and support for non-linear workflows (e.g., branching and merging).
You can donwload it from here install git
Check git version
git --versionmkdir <directory-name>rmdir <directory-name>lstouch <file-name>cd <directory>pwdcat <file-name>95% of the time you will find yourself writing only these commands of git.
git initgit statusgit add .git commit -m "message" git pushgit log git log --onelineThe .git directory is a hidden folder created when you initialize a Git repository using the git init command. It is the core of your Git project and contains all the necessary metadata and history for the repository
if you go into the .git (hidden folder) by running the following command
cd .git
git cat
but the file is compressed so in this case, use
git cat-file -p d439a4edae8ac1ff3bf6cc4f78b12b80f8bc87c5
git diff