GIT- Every developer’s best friend

Part -1

The aim of this article/blog is to get to know about git and some basic commands.

This is a friendly tutorial that will help learners get started with git.

Introduction to GIT

In my journey with open source, I discussed briefly what is Git. Here I will be explaining in detail about Git.

So according to the definitions across the net git is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Basically, Git is an example of DVCS(Distributed version control system.

In my terms git is a tool that helps a developer control the operations of a computer.

For eg: If I want to create a file in a folder then for that execute the following command :

touch filedemo
Got excited… right?

Well, there are separate functional operations that do not require commands just like creating a file. So why should we know this?

These commands are necessary since they give the control as to how you want to store data or maybe use some data in a file or create a folder etc.

Understanding the concept of a project directory

Picture taken from StackOverflow

A project directory is a collection of three major components which are

a) Working Tree is the location on your computer that contains all the directories and files of a single commit. This is the place where the user can edit the file.

b) Staging Area contains a list of all the files that are planned to be used in the next commit.

c) Local Repository contains all the commits that are made for the project. This basically represents the version history project.

Getting Started

So first everyone that refers to this friendly article/blog should have git installed.

If not here is the link for installing git→ Git link

I hope you have installed git. Now I use git bash for executing the commands. You can choose any command of your choice.

Verify the get version installed

git --version

If you want to know more about some commands then use

git help

Note: For this article/blog I am not jumping on to topics like creating a local repo, cloning a remote repo, branching, merging commits, etc. These topics will be covered in the next part. So stay tuned

Coming back to the topic we have now installed git and now we know how to see the version of git.

Configure your user name, email address, and default Git editor.

  1. View your current setting for your user name with
git config user.name

2. If you would like to change your user name, execute

git config --global user.name "Your Name"

3. View your current setting for your email address with

git config user.email 

4. If you would like to change your email address,

 git config — global user.email “your@email” 

5. View your current setting for default Git editor with

git config core.editor 

6. If you would like to change your default Git editor, use

 git config — global core.editor your_preferred_editor 

So this is part-1 that will help you get started. Stay tuned for part-2.

Hope you liked it :)

Please support me by following me and also am open to suggestions on how I can improve so please feel free to leave a comment :)

--

--

--

An inquisitive person trying to create a measurable impact on the ecosystem through technology. Follow me 👉 https://github.com/herkura

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Responsive web design:

How To Use Git Commands

T-1 for the AWS Cloud Practitioner Exam!

Top Built-in Functions for Python Data Structures.

How I got into Data Science and my experience so far..

<Overwhelmed>

AirSwap Developer Series Part 1: Makers and Takers

Testing before release how to avoid large number of bugs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hershil Piplani

Hershil Piplani

An inquisitive person trying to create a measurable impact on the ecosystem through technology. Follow me 👉 https://github.com/herkura

More from Medium

Everything about undoing in Git

Git & Version Control

About basic Git commands

Starting Your First Job in Tech? Relax.