git is a VCS (Version Control System). it is also known as DVCS (Distributed Version Control System).
GitHub/GitLab is a storage/repo: A cloud-based platform for storing and managing Git repositories.
git is SCM(Source Code Management) tools and better than others like: SVM, perforce, ClearCase etc.
Git Stages:
Workspace
--- Where you can see and modify files physically.Staging/indexing area
--- Acts as a buffer area.
--- Takes a snapshot of changes before commit.Repository (Local)
--- Stores committed changes locally on the developer's machine.Repository (central)
--- Stores changes centrally for collaboration and sharing.
Types of repositories:
Bare Repositories.
--- Used for storing and sharing files.
โ- No working directory.
--- All central/remote repositories are bare repositories.Non-Bare Repositories.
--- Used for modifying files.
--- All local repositories are non-bare.
Diagram: