Introduction to Version Control and Git

What is Version Control?

▪ Also known as "source control"

▪ Practice of tracking and managing changes to software code

▪ It enables multiple people to work on a single project simultaneously

▪ Code is hosted centrally on the internet

▪ Every developer has an entire copy of the code locally

Basic Concepts of Version Control

▪ Version Control keeps a history of changes

Every code change and file is tracked!

▪ Git knows how to merge changes automatically.

Merge conflicts - when the same line was changed. (Git cant fix it alone and must be solved manually)

Best Practice : push and pull often from the remote repo to stay in sync.

This is called Continous Integration(CI) - integrating code changes frequently.

▪ Breaking changes don't affect you pull the new code

● Version control keeps the history of changes

● You can revert commits.

● Each change is labeled with a commit message.

Last updated