Git Command Reference
Git is the version control system used by every professional developer. Track changes, collaborate with others, and never lose work again. Choose your level below.
What is Git?
Git is a version control system. It tracks every change you make to your code files — who changed what, when, and why. If you break something, you can roll back. If you want to try something risky, you can branch off, experiment, and merge back if it works.
Git runs locally on your computer. GitHub is a website that hosts your Git repositories online so you can share them and collaborate with others.
First-Time Setup
Before your first commit, tell Git who you are. This name and email will appear in your commit history.
git config --global user.name "Your Name" git config --global user.email "you@example.com" git config --global core.editor "code --wait"Starting a Repository
mkdir my-project && cd my-project git init git clone https://github.com/username/repo-name.gitThe Daily Workflow
Every day you'll use these four commands. They form the core loop of working with Git: check what changed, stage it, commit it, push it.
git pull git status git add index.html styles.css git commit -m "Add hero section and fix nav styles" git pushIgnoring Files
Create a file called .gitignore in your project root. List files and folders you never want to commit — like node_modules/, .env files, or OS files like .DS_Store.
node_modules/ .env .env.local .DS_Store dist/ *.log