Git Installation and Usage Guide
Git Visual Learning
Before installing and using Git, it’s highly recommended to understand Git concepts through visual learning:
Recommended Learning Path
- Visit Learn Git Branching - Learn Git through interactive games
- Read Pro Git Book - Comprehensive learning reference
System Installation Guide
Windows System
-
Download and Install Git
- Visit Git Official Website
- Click “Download for Windows”
- Run the installer with default options
-
Install GUI Tool (Recommended for Beginners)
- Download GitHub Desktop
- Follow installation prompts
-
Command Line Usage
- Opening Command Line:
- Windows Terminal (Recommended): Press
Win + X
, select “Windows Terminal” - Command Prompt: Press
Win + R
, typecmd
, press Enter - Git Bash: Right-click in folder, select “Git Bash Here”
- Windows Terminal (Recommended): Press
- Basic Commands:
# Change directory cd C:\path\to\ComfyUI # List directory contents dir # Go up one directory cd ..
Windows Notes
- Use backslash
\
for paths - Use quotes for paths with spaces:
cd "Program Files"
- Use Tab key for path auto-completion
- Opening Command Line:
Mac System
-
Installation Options
a) Official Website Installation
- Visit Git for Mac
- Download and install macOS version
- Or use Xcode Command Line Tools:
xcode-select --install
b) Using Homebrew (Recommended)
# Install Homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install Git brew install git
-
Command Line Usage
- Opening Terminal:
- Built-in Terminal: Press
Command + Space
, search “Terminal” - iTerm2 (Recommended):
- Download iTerm2
- Launch from Applications folder
- Built-in Terminal: Press
- Basic Commands:
# Change directory cd /path/to/ComfyUI # List contents ls # Show current path pwd
- Opening Terminal:
-
GitHub Desktop (Optional)
- Download GitHub Desktop for Mac
- Launch from Applications folder
Linux System
-
Package Manager Installation
Ubuntu/Debian:
sudo apt update sudo apt install git
Fedora:
sudo dnf install git
CentOS/RHEL:
sudo yum install git
Arch Linux:
sudo pacman -S git
-
Command Line Usage
- Opening Terminal:
- Keyboard shortcut:
Ctrl + Alt + T
- Or search “Terminal” in applications menu
- Keyboard shortcut:
- Basic Commands:
# Check Git version git --version # Configure user info git config --global user.name "Your Name" git config --global user.email "[email protected]" # Common directory operations cd /path/to/ComfyUI # Change directory ls # List files pwd # Show current path
Linux Tips
sudo
requires administrator password- Paths are case-sensitive
- Use
~
for home directory
- Opening Terminal:
ComfyUI Download Guide
Plugin Downloads
Method 1: Using GitHub Desktop (For Beginners)
- Clone Plugin Repository
- Open GitHub Desktop
- Click “File” -> “Clone Repository”
- Paste the plugin’s GitHub URL
- Select destination (ComfyUI/custom_nodes folder)
- Click “Clone”
Method 2: Using Command Line
cd ComfyUI/custom_nodes
git clone repository-url
For example, installing ComfyUI-Manager:
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
Model Downloads
Method 1: Using GitHub Desktop
- Download Complete Model Repository
- Clone model repository in GitHub Desktop
- Save to appropriate model directory
- Example: Checkpoints go to
models/checkpoints
Method 2: Using Command Line
# Download Checkpoint models
cd models/checkpoints
git clone model-repository-url
# Download LoRA models
cd models/loras
git clone model-repository-url
Model Directory Guide
- Checkpoint models:
models/checkpoints
- LoRA models:
models/loras
- VAE models:
models/vae
- Embedding models:
models/embeddings
Common Issues
Download Troubleshooting
- Network timeout: Use proxy or mirror sites
- Insufficient space: Check disk space
- Permission issues: Verify folder write permissions
- Clone fails: Try
git clone --depth 1
for latest version only
Advanced Tips
Common Git Commands
git pull
: Update repository to latest versiongit checkout [branch-name]
: Switch to specific versiongit clean -df
: Clean untracked filesgit reset --hard
: Reset to latest version