What is Git?

  • Git is a distributed version control system.
  • It helps developers track changes in source code.
  • Created by Linus Torvalds in 2005.

Why Use Git?

  • Tracks history of changes.
  • Facilitates collaboration in teams.
  • Supports branching and merging.
  • Works with remote repositories like GitHub.

Git vs GitHub

Git is a tool for version control on your local machine.
GitHub is a cloud service for hosting your Git repositories online.

Basic Git Commands

  • git init – Initialize a new repository
  • git add . – Stage all changes
  • git commit -m "message" – Commit changes
  • git push – Push changes to remote