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. Setting fsmonitor.allowRemote to true overrides this behavior. Only respected when core.fsmonitor is set to true. ⭐
  • 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 when core.fsmonitor is set to true. πŸ”Œ

πŸ‘‘ GIT πŸ‘‘

Part of the git(1) suite. one big happy family fr fr 🌈


πŸ“ NOTES πŸ“

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