Skip to main content
GitFS is a FUSE-based virtual filesystem that mounts Mesa repositories as local read-only directories without cloning. It is ideal for agents, CI pipelines, and large monorepos where a full clone is impractical. GitFS supports macOS and Linux. Effectively, when you’re running git-fs, all of GitHub becomes just a directory on your system:
  • Want to learn more about Linux? — ls /git-fs/github/torvalds/linux
  • Where does FastAPI do serialization? — grep -ir 'serialize' /git-fs/github/fastapi/fastapi
  • How does GNOME interact with X11? — grep -ir 'x11' /git-fs/gitlab/GNOME/gnome-shell
GitHub and GitLab are your oysters!
GitFS is early-stage, alpha software. We’ve tried our best to make it reliable, but you may encounter occasional performance issues.If you run into any issues, we urge you to open issues.
We are working towards supporting writes, esp. with a focus on automatic session management, so you don’t have to touch git worktree ever again. Stay tuned for updates!

Installing

curl -fsSL https://github.com/mesa-dot-dev/git-fs/releases/latest/download/install.sh | sh
All major deb- and rpm-based distros are supported. The install script will use our .deb and .rpm packages published on our releases page.
For other distros, install.sh will ask you whether you want to proceed, but you will need to install fuse and libssl1.1 dependencies manually.If your repo isn’t supported by install.sh and you would like support, please file a new issue.

Getting Started

The absolute easiest way to get started is to run git-fs:
$ git-fs
git-fs will ask you for the initial configuration, and will store that for future use.
For most systems, the default mount point is ~/.local/share/git-fs/mnt.
Run ls ~/.local/share/git-fs/mnt/github/daytonaio/daytona check out the Daytona source. When you’re done, hit CTRL+C and git-fs will clean up after itself.
You cannot ls the whole github directory. There are at millions of github repos so calling ls mnt/github would cause your system to grind to a halt!That’s why, if you run ls ~/.local/share/git-fs/mnt/github, you will see a “Permission denied” error. You must always specify which repo you want to read, like so:
ls ~/.local/share/git-fs/mnt/github/torvalds/linux
You can enable logs by controlling the RUST_LOG environment variable:
$ RUST_LOG=debug git-fs

Connecting with Mesa

To get access to your Mesa Repos, you need to configure your API key in the configuration file. After your API key is provided, run:
ls ~/.local/share/git-fs/mnt/<your-org>/
and see all your repos!

Configuration

git-fs is configured through a config file. The configuration file is searched for in:
  • $XDG_CONFIG_HOME/git-fs/config.toml (highest priority, Linux only).
  • $HOME/.config/git-fs/config.toml
  • /etc/git-fs/config.toml (lowest priority),
You can override the path to the config file with the --config-path flag.
An example config file is:
# git-fs configuration file

# mount-point specifies where the local filesystem will be mounted.
# Each of your orgs will be available as a top-level directory within
# this mount point.
#
# In this example, the resulting file tree will look like this:
#
# ~/mesa-mnt/
# ├── hooli-corp/
# │   ├── my-repo1
# │   └── my-repo2
# ├── globex-corp/
# │   ├── my-repo1
# │   └── my-repo2
# ├── github/
# │   ├── torvalds/
# │   │   ├── linux
# │   │   ├── uemacs
# │   │   └── ... (all repos available on github)
# │   └── ... (any other github org/repo you want)
# └── gitlab/
#     └── ...(any gitlab repo you want)
mount-point = "/home/<you>/.local/share/git-fs/mnt"

# When running git-fs in daemon moode, you will need to specify a file
# for the PID file. This prevents two daemons running at the same
# time.
[daemon]
# Path to the PID lock file.
path = "/home/<you>/.local/share/git-fs/git-fs.pid"

# You can register any number of private organizations here. Each
# organization will be mounted within the mesa mount point as a
# top-level directory.
[organizations.hooli-corp]
api-key = "" # Your Mesa API key for this organization.

[organizations.globex-corp]
api-key = ""

# GitFS requires a local cache directory to store repository data.
[cache]
# Path to the cache.
path = "/home/<you>/.local/share/git-fs/cache"
# Maximum size of the cache. When the cache exceeds this size, old
# data will be evicted. Note that this is currently not used.
max-size = "10GB"

Environment variable overrides

All configuration values can be overridden with GIT_FS_-prefixed environment variables:
GIT_FS_MOUNT_POINT="/opt/mesa/mnt" git-fs

Daemon-mode

You can run git-fs in daemon mode. This will cause it to jump into the background and leave you alone. Note that logs will go nowhere (we’re working on it).
$ git-fs daemon

Known Issues

  • git-fs does not currently support repos of which the branch name is not main.