New to FORGE? Start a free 30-day trial

Version Control Setup

Updated on Oct 1, 2026

This page explains which Forge files to commit and which to add to .gitignore. It helps you share configuration with your team without committing credentials, lock files, or machine-specific artifacts.

What to commit

PathContentsRecommendation
.forge/config/project.toml, agents.toml, toolchain.toml, commands.toml, workflows/Commit, except telemetry.toml and opensearch.toml
.forge/prompts/Custom prompt templatesCommit
.agents/skills/Agent skillsCommit
.forge/.config_lockConfiguration lock created by frg config lockCommit when your team uses drift detection
.forge/work/Job outputs: plans, reviews, traces, sessions, approvalsTeam decision
.forge/context.tomlCurrent issue, PR, ticket, service, and user identityDeveloper-specific; consider ignoring
.forge/cache/, .forge/logs/Cache and utility logsIgnore
.forge/.context.lock, .forge/.workflow.lockRuntime locksIgnore
.forge/license/License filesIgnore

frg config init prints these patterns. Add them to your .gitignore, together with .forge/license/:

gitignore
# Forge
.forge/logs/
.forge/cache/
.forge/.context.lock
.forge/.workflow.lock
.forge/work/**/traces/.heartbeat
.forge/config/opensearch.toml
.forge/config/telemetry.toml
.forge/license/

# Optional (team decision): job outputs
# .forge/work/

telemetry.toml and opensearch.toml can contain endpoint headers and API tokens. License files are issued per user or organization.

Decide about .forge/work/

Commit .forge/work/ when your team wants plans, reviews, and traces to be visible and auditable. Ignore it to keep the repository focused on source code, or when traces can contain sensitive context.

To commit plans and reviews but exclude session and approval state, add:

gitignore
.forge/work/**/sessions.toml
.forge/work/**/.sessions.lock
.forge/work/*/approvals/

Monorepos

If .forge/ directories exist below the repository root, prefix the patterns with **/:

gitignore
**/.forge/logs/
**/.forge/cache/
**/.forge/.context.lock
**/.forge/.workflow.lock
**/.forge/work/**/traces/.heartbeat
**/.forge/config/opensearch.toml
**/.forge/config/telemetry.toml
**/.forge/license/

Stop tracking files that are already committed

  1. Add the patterns to .gitignore.
  2. Remove the files from the index. Your local copies are kept.
bash
git rm -r --cached --ignore-unmatch .forge/logs/ .forge/cache/
git rm --cached --ignore-unmatch .forge/.context.lock .forge/.workflow.lock
git rm --cached --ignore-unmatch .forge/config/telemetry.toml .forge/config/opensearch.toml
  1. Commit the change:
bash
git commit -m "chore: ignore Forge runtime files"

Remove credentials from history

Warning: Rewriting Git history is destructive. Coordinate with your team first.

git rm --cached does not remove a file from history. If you committed a token:

  1. Revoke or rotate the token. Assume it is compromised.
  2. Remove the file from history with BFG Repo-Cleaner or git filter-repo:
bash
bfg --delete-files telemetry.toml
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --force

See Also