SyntaxStudy
Sign Up
Git Introduction to Git
Git Beginner 7 min read

Introduction to Git

Git is a distributed version control system that tracks changes in source code. It was created by Linus Torvalds in 2005. Git lets you revert files back to previous states, compare changes over time, and collaborate with multiple developers simultaneously.

Git stores data as a series of snapshots of your project over time.

Example
# Install Git: https://git-scm.com/downloads
# Check version:
git --version

# First-time setup (do this once)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global core.editor "code --wait"  # VSCode as editor

# Initialize a repository
git init my-project
cd my-project

# Or clone an existing repository
git clone https://github.com/user/repo.git
git clone https://github.com/user/repo.git my-folder

# Check Git configuration
git config --list