FreeFormatHub

Developer Cheatsheets

Comprehensive quick reference guides for common developer tasks and commands. Save time with essential syntax and examples for Git, Terminal, Docker, Regex, Markdown, SQL, HTTP, and Security.

Quick reference guides for programming languages, frameworks, and development tools. Development utilities streamline workflows and increase productivity. Our utility provides solutions to common challenges faced by developers. This tool helps eliminate tedious manual work with automated processing.

Developer Cheatsheets
Comprehensive quick reference guides for common developer tasks and commands. Essential for developers of all experience levels, from beginners to seasoned professionals.

Git Commands Cheatsheet

Setup & Configuration

# Set your identity
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

# Set default editor
git config --global core.editor "code --wait"

# Check configuration
git config --list

Basic Commands

# Initialize a repository
git init

# Clone a repository
git clone <repository-url>

# Check status
git status

# Stage changes
git add <file>       # Add specific file
git add .            # Add all changes

# Commit changes
git commit -m "Commit message"

# Push changes
git push origin <branch-name>

# Pull changes
git pull origin <branch-name>

Branching

# List branches
git branch                  # Local branches
git branch -r               # Remote branches
git branch -a               # All branches

# Create a branch
git branch <branch-name>

# Switch to a branch
git checkout <branch-name>
git switch <branch-name>    # Git 2.23+

# Create and switch to a new branch
git checkout -b <branch-name>
git switch -c <branch-name> # Git 2.23+

# Merge a branch
git merge <branch-name>

# Delete a branch
git branch -d <branch-name>  # Safe delete
git branch -D <branch-name>  # Force delete

Undoing Changes

# Discard changes in working directory
git restore <file>          # Git 2.23+
git checkout -- <file>      # Older Git versions

# Unstage changes
git restore --staged <file> # Git 2.23+
git reset HEAD <file>       # Older Git versions

# Amend last commit
git commit --amend

# Reset to a specific commit
git reset --soft <commit>   # Keep changes staged
git reset --mixed <commit>  # Keep changes unstaged (default)
git reset --hard <commit>   # Discard changes (dangerous)