Coding⏱️ 2 min read📅 2026-06-03
How to Fix: Is there a way to make git pull automatically update submodules?
Automatically update git submodules with git pull.
Quick Answer: Use the `git config --add remote.origin.updateSubmodules true` command to enable submodule updates on every pull.
📋 Table of Contents
To automatically update submodules on every git pull, you can utilize a Git alias or modify your .gitconfig file. This process involves using the `update-submodule` command to initialize and update submodules.
🛑 Root Causes of the Error
- The issue arises from the fact that git submodule update is not automatically run during a pull operation.
🛠️ Step-by-Step Verified Fixes
Method 1: Git Alias
- Step 1: Create a new alias in your .gitconfig file by adding the following line:
git config --global alias.l 'git submodule update --init'}Method 2: .gitconfig File
- Step 1: Create a new file in your repository's root directory named `.gitmodules` and add the following line to it:
[submodule ❓ Frequently Asked Questions
The issue arises from the fact that git submodule update is not automatically run during a pull operation.
Step 1: Create a new alias in your .gitconfig file by adding the following line:
Step 1: Create a new file in your repository's root directory named `.gitmodules` and add the following line to it:
🛠️ Related Fixes
How to Fix: Stuck in tutorial hell after 4 years: How do I b
Fix Stuck in tutorial hell after 4 years: How do I bui. Practice build
How to Fix: Trying to sync mutliple audio tracks to a movie
Fix Trying to sync mutliple audio tracks to a movie bu. Consider using
How to Fix: Failed to merge latest branches from upstream re
Fix Failed to merge latest branches from upstream repo. Try running 'g