Git source directory
📁
Which repo folder to deploy.
Set which folder of a Git repository fortrabbit deploys — the key setting for monorepos where several sub-folders hold independent projects.
The Git source directory is a dashboard setting for environments that have Git deployment enabled. Define which folder in the Git repo should be deployed. In most cases the repository root will work fine. Leave the field empty to use the repository root. Exclude and replace patterns are matched from the Git source directory.
When the repository contains a deploy file, this setting is managed there and cannot be edited in the dashboard.
Use cases
The most common use case is when you have a monorepo that holds multiple websites in one Git repository. For this scenario you can choose to deploy only a subfolder of the root directory, for instance /apps/website-1.