Everything you need to know about Git

GIT is a code maintenance repository. Here we will understand what is a Git repository.How many types of repositories are there.

Difference between local and remote repository and also we will try to understand what is the default location of default repository?What is the default location of default repository etc.

For example 3 developers are working on a single file at same time. Git allows us to track the changes and maintain the history in finding who has done what type of change in this file and this way everyone else is aware of each other changes and also can review other’s changes.
Without Git, everyone will have to maintain separate copies of code in each individual’s machine which makes it difficult to co-ordinate the changes.

Git Repository

Git repository is the place where we store project files.These files which are written/modified by developer will be stored in git repository or repo. for short.
So project code files will be stored in this repository.

There are 2 types of repositories:

1. Remote repository


Remote repository is stored on remote host and will be shared among all developers.This will be setup one time for every project so that each developer can pull them on their machines.

2. Local repository


Local repository is hosted on individual machine of each developer.

Working with new repositories

First time we need to create a repository from scratch.Command to create a new repository:

git init

Working with existing repositories

For already created repository, we need to copy it from remote repository where it is created first time.We do copy the repository by cloning it.


git clone

Leave a comment