Git- Mastering The Version Control.

Unlocking the Power of Git

Jiyan Patil
5 min readMay 31, 2023

Table of Content :

· Why Git.. before What Git !!
· Downloading and Installing Git:
· Git general terms :
· Git Commands:
· What are we going to cover in the next blog:
· Socials :

Why Git.. before What Git !!

Lets understand the problem;

Suppose we are asked to make Subject project Called Library Management System for the subject of DBMS. You are in group of 5 members,everyone is assigned with respective tasks. To start their adventure, the friends create a central repository, a virtual library, where they store all their project files. Git ensures that every change made to the files is carefully recorded, creating a detailed history of the project’s evolution.
Every member can have their separeate path of devloping called Branches.
If certain feature is not working due to some bug by the code done by other member, we can revert back to the lower version and can keep a track of initial to final project.

What is Git :

Git is a free, open source distributed version control system tool designed to handle everything from small to very large projects with speed and efficiency. It was created by Linus Torvalds in 2005 to develop Linux Kernel. I hope this blog will help you get better understanding of Git.

Downloading and Installing Git:

  1. Head over to the official Git website at https://git-scm.com/downloads.
  2. Once there, you’ll find the Git installer tailored to your specific computing platform (Windows, macOS, or Linux). Click on the download link for your platform to get started.
  3. After the download completes, locate the installer file and run it.
  4. Follow the installation steps provided by the installer. It will guide you through the process, allowing you to customize the installation options if desired.
  5. As you go through the installation, you may also consider installing Git GUI tools like GitHub Desktop, which will automatically include Git during its installation.
  6. Once the installation is complete, you can confirm that Git has been successfully installed by opening a command prompt or terminal window on your computer.
  7. In the command prompt or terminal, type “git — version” (without quotes) and press Enter. If Git has been installed correctly, it will display the version information.
git version

If the cmd gives the version of git after the command then we have successfully downloaded the Git.

Git general terms :

Git: A decentralized and open-source version control system that tracks changes in code repositories.

GitHub: A collaborative platform where users can host and collaborate on Git repositories, facilitating team collaboration and project management.

Commit: A record of changes made to a Git repository, capturing a snapshot of the project’s state at a specific point in time.

Branch: A parallel line of development within a Git repository, allowing for separate workstreams without affecting the main codebase.

Clone: Creating a local copy of a Git repository, including all commits and branches, enabling individual work and synchronization with the remote repository.

Remote: A separate copy of a Git repository hosted on a server, typically on platforms like GitHub, allowing team members to exchange and synchronize their changes.

Git Commands:

  1. git config : This command sets the author name and email address respectively to be used with your commits.

commands :

git config -global user.name[name]
git config -global user.email[email]

2. git init: Git init initializes a new Git repository in the current directory

commands :

git init

3. git add : Git add stages changes, preparing them to be included in the next commit

git init

3 . git commit :Git commit captures a snapshot of the current project state and saves it as a new revision in the repository. There is option of sending a message with -m option example git commit -m “Feature added”.

git commit -m "FeatureAdded"

4.git diff : Git diff shows the differences between the current state of the code and the last commit

git diff

5. git clone : A local version of a repository that includes all commits and branches is called a “clone.” suppose we have a Remote code base and we want to have local copy of that code.

git clone

We can see after cloning the remote react-shopping-cart repository to the local system.

Now there are more advanced terminologies such as git push, git pull, fork of a repository but for using such advanced commands we need a knowledge of GitHub that we will be covering in the next blog.

What are we going to cover in the next blog:

  1. More Advanced git commands with github 🚀
  2. Working with github Repositories🚀
  3. Creating our first pull request on github🚀

Thank you!! Lets connect .

Socials :

Linkedin Twitter Github

--

--