GITMODULES(5) Git Manual GITMODULES(5) (NAME) gitmodules - (submodules) (SYNOPSIS) $GIT_WORK_TREE/.gitmodules (DESCRIPTION) .gitmodules git-config(1) . (submodule) . --name git submodule add . : submodule..path ( ) (checkout) . / . .gitmodules . submodule..url (URL) . git-clone(1) ( ./ ../ ) (origin) . : submodule..update git submodule update . git submodule init . : checkout rebase merge none !command ( ). update git-submodule(1) . submodule..branch . HEAD . . . --remote git-submodule(1) . submodule..fetchRecurseSubmodules (recursive fetching) . .git/config .gitmodules . --[no-]recurse-submodules git fetch git pull . submodule..ignore git status diff (modified) . : all ( status commit ). (new commits) git add --force . status update-index diff log ( diff ) . dirty HEAD . untracked . . none . . .git/config .gitmodules . --ignore-submodules . git submodule . submodule..shallow true ( ) . (NOTES) .gitmodules (symbolic link) (checkout) . . (EXAMPLES) .gitmodules : [submodule "libfoo"] path = include/foo url = git://foo.com/git/lib.git [submodule "libbar"] path = include/bar url = git://bar.com/git/lib.git libfoo libbar . include/foo include/bar (URL) . (SEE ALSO) git-submodule(1), gitsubmodules(7), git-config(1) (GIT) git(1) Git 2.55.0 2026-06-29 GITMODULES(5)