Submodules and large files (LFS)
The problem
Section titled “The problem”Two things in git look strange the first time you meet them.
- A folder in your project that is empty after you clone it, or that shows up as changed when you touched nothing in it.
- A file whose diff is three lines of text instead of the file you know, or a message that Git LFS is not installed.
Both are ways to keep something outside the normal history of a repository. The app shows them in plain words instead of raw git output.
Submodules
Section titled “Submodules”A submodule is a repository inside a repository. Your project records which one commit of the other repository it wants, and nothing else about it. It is like a bookmark with a page number: “use library X, at exactly this commit.”
That explains the two strange things:
- After a plain clone the submodule folder is empty. Git has the bookmark, but has not fetched the library yet.
- A submodule shows as changed when its checked-out commit is not the one your project records. The project did not change; the folder inside it moved.
Where you see them
Section titled “Where you see them”When a repository has submodules, Changes gets an extra group called Submodules, with the number of submodules next to it. The group only appears when there are any. Each row shows:
- the folder path and a state: Not initialized, Up to date, Different commit, Modified, Conflict or Not in the index,
- a line of detail, for example “At 3f9a1c2, but this repository records 8b2e4d7”,
- the buttons that fit that state.
A file in the changed-files list that is a submodule carries a small submodule tag. Select it
and the diff pane shows a summary instead of a diff. For a changed submodule it shows the commit
before and after, with the old one in red and the new one in green (3f9a1c2 → 8b2e4d7). It also
says so when the submodule has changes of its own: “Open it as a tab to see and commit them.”
Below the two commits the app lists what lies between them, read from the submodule’s own history: New in the submodule for the commits that came in, and No longer included for the ones that went away (when the checkout moved back, or the two commits went different ways). Each line has the short hash, the subject and the author, and a list stops at 50 commits (it then says “50+ commits”). If the submodule isn’t checked out, or hasn’t fetched one of the two commits yet, the app says that instead. Nothing is downloaded to build the list.
The actions
Section titled “The actions”- Initialize (state Not initialized): clones the submodule from the address in
.gitmodulesand checks out the commit your project records. - Update (state Different commit): checks out the recorded commit in the submodule. Commits on its branches stay where they are; only what is checked out moves.
- Open: opens the submodule as a repository in its own tab, so you can commit inside it. It is available as soon as the submodule is checked out. Right-click a row for the same actions, plus Copy path and Copy address; there Open is called Open as tab.
- Update all, on the group header, does Initialize and Update for every submodule in one go. It is greyed out when nothing needs it, or while another sync is running.
The other states have no button: Up to date and Modified (right commit, but changed or new
files inside) need nothing from this list; Conflict is resolved in the changes list like any
other conflict (Merge conflicts); Not in the index means .gitmodules
lists it but your repository never added it.
If someone changed the address of a submodule in .gitmodules, git keeps using the old one from your
repository config until you sync it. The list then shows a note: .gitmodules has a different address
(…) than this repository uses (…), with the button Sync address. It copies the new address into your
config and into the submodule’s own remote (git submodule sync); nothing is downloaded, and Update
then uses the new address. The new address goes through the same check as above first. A relative address
such as ../lib.git is not reported, because git turns it into a full address when it initializes.
Submodules inside submodules
Section titled “Submodules inside submodules”A submodule that has submodules of its own lists them right below it, indented one step per level, as soon as
the submodule is checked out. Until then the app cannot know what is inside: Initialize the outer one first, and
the inner ones appear as Not initialized. They have the same buttons: Initialize, Update, Sync address
and Open, and the same right-click menu. The app runs git from the submodule that contains them, so the paths it
shows (for example libs/mid/deps/inner) are always counted from the repository you opened.
Update all goes down the tree level by level: first the submodules of your repository, then what turned up inside them, and so on. The list goes four levels deep and holds at most 200 submodules; a submodule with more below that shows “Has submodules of its own that are not listed here; open it as a tab to see them.” Every address in the tree goes through the same safety check as the first level.
Cloning with submodules
Section titled “Cloning with submodules”The Clone dialog has a checkbox Include submodules, on by default. With it, git fetches the submodules and theirs while it clones. Without it their folders stay empty until you press Initialize.
The check on submodule addresses
Section titled “The check on submodule addresses”The address of a submodule comes from .gitmodules, a file written by whoever made the repository.
So the app does not trust it blindly. Before it fetches anything it refuses an address that could
make git do something other than fetch a repository:
- a transport helper such as
ext::, which makes git run any command; - a protocol it does not know (git would then go looking for a program named after it);
- an address or host that starts with
-, which ssh would read as an option; - an empty address, or one with control characters.
Accepted are https, http, ssh, git, git+ssh, ssh+git and file addresses, the short
form git@host:path, and plain or relative paths.
A refused submodule shows the red note “Not fetched: …” with the reason, and its Initialize or Update button is disabled, as is Update all while any submodule has such an address. If you trust the address, fetch it yourself in a terminal. Passwords inside an address are not shown in the list.
Large files (Git LFS)
Section titled “Large files (Git LFS)”Git LFS keeps big files, such as images, binaries and datasets, outside the repository. Inside the repository sits only a small text file, a pointer, with the file’s fingerprint and size. The real file is downloaded when you check out.
How a file looks in the app
Section titled “How a file looks in the app”You do not see the pointer text. Select an LFS file in Changes and the diff pane shows an LFS object summary: “A new file stored in Git LFS”, “A file stored in Git LFS changed” or “A file stored in Git LFS was removed”, with a Before and an After line. Each has the size of that version and the first characters of its fingerprint. Want the raw text anyway? Show pointer text switches to a normal diff of the pointer.
An LFS file that is an image (PNG, JPEG, SVG and so on) shows as the image itself, Before and After side by side, the same as an image that is not in LFS. That works as soon as the file has been downloaded. If it has not, the pane says so and points to Pull LFS files.
Download the files: Pull LFS files
Section titled “Download the files: Pull LFS files”After a clone without Git LFS, or on a branch you have not used yet, the files in your working tree can still be
pointers. In Changes, the LFS locks group has a button Pull LFS files. It runs git lfs pull: it
downloads what is missing from the LFS server (with your usual git login) and puts the real files in your
working tree. What you already have is not downloaded again. The button reads Working… while it runs, and
big files can take a while.
Send the files: Push LFS files
Section titled “Send the files: Push LFS files”Next to it, Push LFS files runs git lfs push for your current branch: it sends the large files that
its commits need and the LFS server does not have yet, to the remote of the branch (otherwise origin).
A normal push does this too, through a hook of git-lfs; this button is for when that hook is missing or you
want to send the files on their own. It has a time limit of 30 minutes. If it fails you see what git-lfs said,
for example when the server cannot be reached or you are not signed in.
When git-lfs is not installed
Section titled “When git-lfs is not installed”The app finds out that a repository uses LFS from a .gitattributes rule with filter=lfs. If
the git-lfs program is missing, a warning bar appears at the top of Changes: Git LFS is not
installed. It explains what goes wrong: those files are small pointer files in your working tree
instead of their content, and a file you change or add goes into git itself instead of into LFS.
To fix it, install Git LFS (it comes with Git for Windows; on Linux and macOS use your package
manager), then run git lfs install in a terminal. Press Check again in the
bar and it goes away; Pull LFS files then downloads the files. Repository health reports the same thing.
LFS locks
Section titled “LFS locks”Big binary files, such as images, models and scenes, can’t be merged: when two people change the same one, one of them loses their work. A lock is a way to say “I’m working on this file, leave it alone”. The LFS server keeps the locks, and others cannot change a locked file until you unlock it. The app shows and manages them for you.
In Changes, under Submodules, a group LFS locks appears. It is there only when the
repository uses LFS and git-lfs is installed. Each lock has the file’s path, its owner (You
for your own, otherwise the name of the person) and when it was set (Locked 12 Nov 2026, 09:15).
The group’s heading counts them, and an empty list says No files are locked.
- Lock file… asks for a Path, relative to the repository folder (for example
art/logo.psd), and locks it. - Unlock on a lock releases it.
- Force unlock is what the button says on a lock that belongs to someone else. It asks first, because that person may be working on the file right now.
- Unlock anyway is the confirmation when your own file has changes that are not committed yet. Once it is unlocked, others can change it while your changes aren’t saved in a commit; committing or discarding first is safer.
- Refresh asks the server again.
- Below the list, the files marked
lockablein.gitattributesthat nobody has locked: git-lfs makes those read-only in your folder until you lock them. Each has a Lock button. The list looks only at the first 2000 LFS files and says so when there are more. It is local and cheap, so it needs no server.
The app doesn’t ask the server on every change, because that goes over the network: git-lfs talks to the server each time, which can take a few seconds on Windows, and a server that wants a login shows the usual login dialog. It asks when you open Changes in a repository that uses LFS, and again after every lock or unlock and when you press Refresh. While it waits you see Asking the LFS server….
Not every server can say which locks are yours. Then the list shows each owner’s name and every button says Unlock, without the extra warning for other people’s locks. If the server refuses to unlock one, the app asks Force unlock …? with the owner’s name and the warning that the lock may belong to someone else, who may be working on the file right now. Only if you confirm does it unlock it anyway. Look at the name before you press it.
In the command palette
Section titled “In the command palette”With a repository that has submodules or uses LFS, the command palette (Ctrl+K) has Update submodules,
Sync submodule addresses from .gitmodules (only when an address differs), Pull LFS files,
Push LFS files and Lock LFS file…. They take you to Changes first, where an error would show.
Under the hood
Section titled “Under the hood”- LFS locks:
git lfs locks --jsonlists them, andgit lfs locks --verify --jsontells which are yours. Lock file… isgit lfs lock --json -- <path>. Unlock isgit lfs unlock --json, with--forcefor Force unlock and Unlock anyway, and--id=<id>for another person’s lock. The app letsgit lfsdo the work, with the logins git already has. - The list:
.gitmodulesis read withgit config --file .gitmodules, the recorded commits withgit ls-files --stage, and the state withgit status --porcelain=v2 --ignore-submodules=none. - Sync address:
git -c protocol.ext.allow=never submodule sync -- <paths>. - Push LFS files:
git lfs push <remote> refs/heads/<branch>. Lockable files:git lfs ls-files --name-onlyandgit check-attr -z --stdin lockable. - Initialize, Update and Update all:
git -c protocol.ext.allow=never submodule update --init --progress -- <paths>. Not recursive. - Clone with submodules:
git -c protocol.ext.allow=never clone --progress --recurse-submodules. - LFS detection:
git lfs version, and a look at.gitattributes.
When it goes wrong
Section titled “When it goes wrong”-
Update leaves a submodule alone. It has changes of its own that are in the way; git does not overwrite them. Open the submodule, commit or stash there, then update again.
-
The buttons are greyed out. A sync is running, or the address is refused (see above).
-
I changed a file in the submodule and the parent shows it as changed. That is how it works: commit inside the submodule first, then commit the new commit in the parent to record it.
-
LFS locks shows an error with Try again. Git LFS could not read or change the locks. The remote may have no LFS server, or no lock support, or you are not signed in. Check the remote, sign in (see Logins and privacy), and press Try again. An error is shown as an error, never as an empty list, so No files are locked really means that.
-
An unlock reported an error, but the lock is gone. git-lfs sometimes reports a failure after the lock was already removed on the server. The app looks again after a failed unlock, so the list shows what is true. Refresh if you want to be sure.
-
The LFS locks group is missing. The repository doesn’t use LFS (no
filter=lfsrule in.gitattributes), orgit-lfsisn’t installed; see above.