Git Command Reference

Quick reference for common Git commands with examples

git init

Initialize a new Git repository

Example:

git clone <repository>

Clone a remote repository

Example:

git add <file>

Add files to staging area

Example:

git commit -m "<message>"

Commit changes

Example:

git status

Check repository status

Example:

git log

View commit history

Example:

git diff

Show changes

Example: