GIT-FSMONITOR--DAEMON(1)
β¨ NAME β¨
okay so bestie, welcome to git-fsmonitor--daemon β the git-fsmonitor--daemon(1) manual page, and honestly? it's giving built-in filesystem monitor realness π
she watches your files so git doesn't have to π«Ά
πΈ SYNOPSIS πΈ
git fsmonitor--daemon start
git fsmonitor--daemon run
git fsmonitor--daemon stop
git fsmonitor--daemon status
Four little modes, four little vibes, no cap β¨
π¦ DESCRIPTION π¦
So basically this is a daemon β a little background bestie whose whole job is to watch the working directory for file and directory changes, using platform-specific filesystem notification facilities π (like, the OS does the watching, she just listens, iykyk).
She talks directly to commands like git status through the simple IPC[1] interface instead of going through the slower githooks(5) interface. Direct line, no middleman, main character energy fr fr π
And the best part? She's built into Git, which means no third-party tools are required. Zero. None. We love that for us π
π OPTIONS π
startβ starts a daemon in the background. she goes and does her thing, you keep doing yours π§runβ runs a daemon in the foreground. she's right there with you, in your terminal, holding your hand the whole time π₯Ίstopβ stops the daemon running in the current working directory, if present. key words: if present β no drama if she's not there πstatusβ exits with zero status if a daemon is watching the current working directory. like a vibe check, but for daemons β
π₯ REMARKS π₯
She's a long running process, okay? One single working directory, one watchlist of the recently changed files and directories. That's her whole personality and honestly? iconic π
The performance glow-up is real: commands such as git status can get faster if they just ask for a summary of changes to the working directory β because then they can avoid scanning the disk entirely. no disk crawl, no tears, slay πβ¨
When core.fsmonitor is set to true (see git-config(1)), commands such as git status will ask the daemon for changes and automatically start it (if necessary). she's self-starting, lowkey a queen πΈ
For more info, peep the "File System Monitor" section in git-update-index(1). it's all there, bestie π
π CAVEATS π
okay babes, this is the part where we get real. read it. it matters π«Ά
Submodules? She doesn't know them. The fsmonitor daemon does not currently know about submodules, and does not know to filter out filesystem events that happen within a submodule. So if she's watching a super repo and a file gets modified inside a submodule's working directory, she'll report that change as happening against the super repo. π BUT β the client will properly ignore these extra events, so performance may be affected, but it will not cause an incorrect result. phew. correctness stays winning π
Network-mounted repos are a whole thing. By default, the fsmonitor daemon refuses to work with network-mounted repositories. You can override that by setting fsmonitor.allowRemote to true. Note, however β and this is important β the fsmonitor daemon is not guaranteed to work correctly with all network-mounted repositories, so such use is considered experimental. experimental is a nice word for "we warned you" π
The socket situation (Mac OS + Linux). On Mac OS and Linux, the inter-process communication (IPC) between various Git commands and the fsmonitor daemon is done via a Unix domain socket (UDS) β a special type of file β which is supported by native Mac OS and Linux filesystems, but not on network-mounted filesystems, NTFS, or FAT32. Other filesystems may or may not have the needed support; the fsmonitor daemon is not guaranteed to work with these filesystems and such use is considered experimental. β οΈ
By default, the socket is created in the .git directory. BUT β plot twist β if the .git directory is on a network-mounted filesystem, it will instead be created at $HOME/.git-fsmonitor-*, unless $HOME itself is on a network-mounted filesystem, in which case you must set the configuration variable fsmonitor.socketDir to the path of a directory on a native filesystem in which to create the socket file. π
And if none of the above directories (.git, $HOME, or fsmonitor.socketDir) is on a native filesystem, the fsmonitor daemon will report an error that will cause the daemon and the currently running command to exit. both of them. gone. π
π§ LINUX CAVEATS π§
On Linux, the fsmonitor daemon uses inotify to monitor filesystem events. The inotify system has per-user limits on the number of watches that can be created. The default limit is typically 8192 watches per user.
For large repositories with many directories, you may need to increase this limit. Check the current limit with:
cat /proc/sys/fs/inotify/max_user_watches
To temporarily increase the limit:
sudo sysctl fs.inotify.max_user_watches=65536
To make the change permanent, add to /etc/sysctl.conf:
fs.inotify.max_user_watches=65536
boom. watch limit handled. you're welcome π«Άβ¨
π CONFIGURATION π
heads up bestie: everything below this line in this section is selectively included from the git-config(1) documentation. the content is the same as what's found there. so like, don't come for me, it's official π
fsmonitor.allowRemoteβ By default, the fsmonitor daemon refuses to work with network-mounted repositories. Settingfsmonitor.allowRemotetotrueoverrides this behavior. Only respected whencore.fsmonitoris set totrue. βfsmonitor.socketDirβ This Mac OS and Linux-specific option, if set, specifies the directory in which to create the Unix domain socket used for communication between the fsmonitor daemon and various Git commands. The directory must reside on a native filesystem. Only respected whencore.fsmonitoris set totrue. π
π GIT π
Part of the git(1) suite. one big happy family fr fr π
π NOTES π
- simple IPC β
file:///usr/share/doc/git-doc/technical/api-simple-ipc.html
and that's the whole page, bestie!! πβ¨ππ¦πΈπ π«Ά
cute little sign-off time: this was Git 2.56.0, dated 2026-09-27, and the doc you just read is GIT-FSMONITOR--DAEMON(1). go forth and let the daemon cook π₯πβ
π¦ where this page comes from
- arch rolling: git 2.56.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms