SAGARFIVE

1. Introduction

2. Git Basics

3.  Git Terminology

4.  Git Branching

5.  Git - Github

6.  Git Add (Git staging)

7.  Git Commit

8.  Github Advanced

9.  Git Remote

3.4 What is Git Repository & Types ?

  • Repository is a directory which contains all files related to a project
  • We can make normal repository to git repository , by installing git in your machine
  • and intialysing that directory with git init command
  • The below shows us how to create a git repository, we can learn more in next pages

1. Create your project and open that directory , right click and select git bash here

2. Initializing the git

git init

3. Check your git project status

git status

4. Now we can see that git showing what files are git tracking, so now normal directory is became git repository , if you want to know more about work flow , please review git workflow article

Types of Git repositories are :

  1. Non bare repository (Normal repository)
  2. Bare repository

Non bare repository (Normal repository) :

Non-bare repositories, users can modify the existing repository and create new versions. By default, the cloning process creates a non-bare repository.

Bare repository :

A bare repository in Git just contains the version control information and no working files (no tree) and it doesn’t contain the special .git sub-directory.