Nick R.
04/01/2026, 4:55 PMgitBranchToEnvironmentMapping, after mapping develop, staging, production, I'm wondering if there is a way to do a catch-all for any other branch (feature/, fix/, etc...)Nick R.
04/01/2026, 4:57 PM"gitBranchToEnvironmentMapping": {
"develop": "dev",
"staging": "staging",
"production": "prod",
"*": "dev",
}Nick R.
04/01/2026, 4:58 PMdevelop.Jake (Infisical)
04/02/2026, 1:39 PMgitBranchToEnvironmentMapping right now. It only does exact branch name matching. But the good news is defaultEnvironment already works as a catch-all. If the current branch doesn't match anything in the mapping, the CLI falls back to defaultEnvironment. So you can just do:
1{
2 "workspaceId": "...",
3 "defaultEnvironment": "dev",
4 "gitBranchToEnvironmentMapping": {
5 "staging": "staging",
6 "production": "prod"
7 }
8}
Any branch not explicitly listed — feature/, fix/, develop, whatever, will automatically use dev. Should do exactly what you need!
Let me know if this clears this up.Nick R.
04/02/2026, 2:56 PM