GIT INTRODUCTION

What is Git?

Git is a version control system
Git was created by Linus Torvalds in 2005 and has been maintained by Junio Hamano since then
Git is used for tracking code changes, tracking who made changes and coding collaboration

What does Git do?

Manage projects with Repositories
Clone a project to work on a local copy
Control and track changes with Staging and Committing
Branch and Merge to allow for work on different parts and versions of a project
Pull the latest version of the project to a local copy
Push local updates to the main project

Working with Git

Initialize Git on a folder, making it a Repository
Git now creates a hidden folder to keep track of changes in that folder
When a file is changed, added or deleted, it is considered modified
User select the modified files they want to Stage
The Staged files are Committed, which prompts Git to store a permanent snapshot of the files
Git allows user to see the full history of every commit
User can revert back to any previous commit
Git does not store a separate copy of every file in every commit, but keeps track of changes made in each commit

Why Git?

Over 70% of developers use Git
Developers can work together from anywhere in the world
Developers can see the full history of the project
Developers can revert to earlier versions of a project

Git platforms

There are various git platforms which they makes tools that uses git
Example of git platforms are GitHub, Bitbucket, Gitlab, etc.
GitHub is the largest host of source code in the world, and has been owned by Microsoft since 2018