Skip to content

Introduction to Git

What is Git

Git is an "SCM" (Source Control Manager) or "VCS" (Version Control System), or any combination of source/code/version control and system/manager...

It is widely used for tracking changes in software development. It allows multiple developers to work on the same project simultaneously, efficiently managing different versions of code. Git helps track the history of changes, revert to previous versions of code if necessary, and merge changes from different branches. It is an essential tool for team collaboration and effective management of software development projects.

One of its features is that it is decentralized: a user can create a repository on their machine that will contain all versions of all contents of their repository, and there can be multiple sources of truth.

We can see Git as a content database.

A local repository can be a clone of a remote repository with which we will synchronize from time to time (send our commits with the git push command, and receive new branches with git fetch), we will see this later.

All operations are possible in Git: if content has been recorded once, it is always recoverable. The key takeaway is that we can and should commit often, even if we modify them later. All commits themselves are modifiable (in reality, they will no longer be the same commits).

1st rule:

  • commit often
  • push rarely