Skip to content

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

System Installation Guide

Windows System

  1. Download and Install Git

    • Visit Git Official Website
    • Click “Download for Windows”
    • Run the installer with default options
  2. Install GUI Tool (Recommended for Beginners)

  3. Command Line Usage

    • Opening Command Line:
      • Windows Terminal (Recommended): Press Win + X, select “Windows Terminal”
      • Command Prompt: Press Win + R, type cmd, press Enter
      • Git Bash: Right-click in folder, select “Git Bash Here”
    • 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

Mac System

  1. 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
  2. Command Line Usage

    • Opening Terminal:
      • Built-in Terminal: Press Command + Space, search “Terminal”
      • iTerm2 (Recommended):
        1. Download iTerm2
        2. Launch from Applications folder
    • Basic Commands:
      # Change directory
      cd /path/to/ComfyUI
       
      # List contents
      ls
       
      # Show current path
      pwd
  3. GitHub Desktop (Optional)

Linux System

  1. 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
  2. Command Line Usage

    • Opening Terminal:
      • Keyboard shortcut: Ctrl + Alt + T
      • Or search “Terminal” in applications menu
    • 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

ComfyUI Download Guide

Plugin Downloads

Method 1: Using GitHub Desktop (For Beginners)

  1. 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

  1. 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 version
  • git checkout [branch-name]: Switch to specific version
  • git clean -df: Clean untracked files
  • git reset --hard: Reset to latest version