blur code

Blur Code

Working towards providing new and cool programming articles.
A perfect blend of knowledge & technology to become a better coder

Everything you need to know about git | Part - 2

How to use Git version control. Everything you need to know before using git.

Ajitesh Panda

3 minute read

How to use Git version control. Everything you need to know before using git.

If you have never worked with github before, then it can be a bit confusing to start with all those terminal commands. Push Pull Merge etc. But honestly, its quiet simple once you understand what everything is.

So let’s explore Git a bit more, if you are beginner then we recommend, first complete the Part-I of this series(link here) and then continue here.


1. How to fork a repository ?

But what is forking ?

Forking a repository means, making a working copy of someone else’s repository.

  1. Step - 1: Click on the Fork button in the repository page
  2. Step - 2: Choose the name under which you want to fork the repository

You fork will be created

Source My Linux
Source My Linux

2. How to clone a git repository ?

But what is cloning ?

Cloning is another word for downloading a repository in your local machine.

Steps to clone the git repository:

  1. Step - 1: copy the git repository link
Source My Linux
Source My Linux
  1. Step - 2: run the command on your terminal
Source My Linux
Source My Linux

Contratulations! Your successfully forked and cloned a repository.


3. How to pull from a git repository ?

What is pull ?

By pulling changes to a git repository, we load the changes on our local machine made by someone else on the repository.

  1. Open your terminal and move into the directory, which contains your git repository and type the command git pull
Source My Linux
Source My Linux

4. How to add a README ?

What is a readme file ?

A readme file help other developers and reviewers to know, what the project contains.

  • Method - 1: Add a README from terminal
Source My Linux
Source My Linux
  • Method - 2: Add README directly from Github
Source My Linux
Source My Linux

Congratulations! You have successfully added a README file.


5. How to add a LICENCE ?

What is a licence file ?

A licence file lay the guidlines about the distribution of your project.

  • Step - 1: Click on Create new file
Source My Linux
Source My Linux
  • Step - 2 : Type LICENCE on the “Name you file…” bar and click on Choose a license template
Source My Linux
Source My Linux
  • Step - 3: Choose a license template from the left side options and click on Review and submit

  • Step - 4: Click on Commit new file

Source My Linux
Source My Linux

Congratulations! You have successfully added a LICENCE file


Reviews

If You find it interesting!! we would really like to hear from you.

Ping us at Instagram/@the.blur.code

If you want articles on Any topics dm us on insta.

Thanks for reading!! Happy Coding

Recent posts

Categories