mirror of
https://github.com/git-ai-project/git-ai.git
synced 2026-04-25 06:15:51 +03:00
[GH-ISSUE #357] Feature Request: Support workspace with multiple independent git repositories #131
Closed
opened 2026-03-02 04:12:04 +03:00 by kerem
·
11 comments
No Branch/Tag specified
main
sessions-v2-drop-legacy-wrapper
worktree-windsurf-fixes
fix/windsurf-dirty-type-fix
sessions-v2
johnw/review-fix-tests
johnw/review-attribution-test-guidelines
johnw/review-integration-tests
johnw/review-refactor-api
johnw/review-silent-errors
johnw/review-harden-daemon
dependabot/cargo/cargo-1a59d422c9
johnw/synopsis
codex/windows-daemon-restart-upgrade-fix
dependabot/npm_and_yarn/agent-support/vscode/main/eslint-10.2.1
dependabot/cargo/main/interprocess-2.4.2
dependabot/npm_and_yarn/agent-support/vscode/main/typescript-6.0.3
dependabot/npm_and_yarn/agent-support/vscode/main/vscode/vsce-3.9.1
dependabot/cargo/main/openssl-0.10.78
dependabot/npm_and_yarn/agent-support/vscode/main/typescript-eslint/eslint-plugin-8.58.2
dependabot/cargo/main/ureq-3.3.0
dependabot/npm_and_yarn/agent-support/opencode/main/opencode-ai/plugin-1.14.19
dependabot/npm_and_yarn/agent-support/vscode/main/types/vscode-1.116.0
dependabot/cargo/main/tokio-1.52.1
dependabot/npm_and_yarn/agent-support/opencode/main/typescript-6.0.3
dependabot/cargo/main/uuid-1.23.1
worktree-agent-a97fd8c7
fix/partial-add-commit-attribution
perf/daemon-ingest-scalability
fix/daemon-wrapper-daemon-flakiness
johnw/nix-fix
fix/partial-stage-attribution-carryover
fix/rebase-notes-loss-v2
fix/issue-1025-reset-performance
fix/attribution-carryover-on-partial-commit
stats-bar-untracked
fix/rebase-notes-loss
fix/amend-total-additions-inflation
fix/sibling-heuristic-v2
fix/sibling-git-ai-heuristic
fix/total-additions-reset-inherited-prompts
feat/known-human-notepad-plus-plus
feat/known-human-eclipse
feat/known-human-zed
bump-stats-line-limit
feat/known-human-vim
feat/known-human-sublime-text
feat/known-human-visual-studio
feat/known-human-neovim
feat/known-human-xcode
johnw/review-vscode-extension
worktree-feat+git-version-warning
worktree-issue-211-empty-authorship
johnw/missing-notes
johnw/bash-support
feat/prompt-event-fields
devin/1775438423-filter-mock-ai-metrics
fix/external-rebase-preserves-ai-notes
devin/1775442585-mtime-race-checkpoint-promotion
fix/rebase-attribution-remaining-issues
fix/rebase-attribution-pull-rebase-no-verify-autosquash
fix/am-attribution-patch-headers
codeql-java-kotlin-fix
feat-log-dump-command
fix/allow-checkpoint-saving-when-debug-enabled
fix/async-mode-notes-sync
codex/fix-local-debug-daemon-connect
codex/cursor-explicit-checkpoint-paths
devin/1774989709-sentry-sdk-migration
devin/1775066168-fix-merge-commit-stats
devin/1775066000-disable-auth-feature-flag
feat-test-missing-notes-post-push
feat/ssh-alias-resolution
devin/1774936075-fix-show-prompt-commit-scope
fix/issue-870-preserve-prompts-in-ci-squash
devin/1774931412-amend-no-edit-regression
enable-flush-dev-logs
fix/async-mode-test-default
async-mode-default
fix/install-async-mode-config
feat/prompt-event-metric
perf/streaming-fast-import
claude/track-agent-version-WEWmR
hunk-opt
perf/checkpoint-2x-speedup
feat/sharded-notes-refs
remove/git-hooks-hard-cutover
perf/rebase-parallel-notes-and-file-reads
codex/windows-readonly-wrapper-fast-path
fix/stale-daemon-recovery
dev/simulate-authorship
devin/1774410513-cloud-default-ai-attribution
codex/fix-wrapper-default-hooks-forwarding
codex/daemon-phase1
codex/metrics-db-reliability-v2
codex/checkpoint-stress-benchmarks
codex/hook-telemetry-followups
johnw/fix-371
devin/1772084830-perf-batch-git-calls
devin/1772226661-fix-windows-paths-all-agents
codex/pathspec-benchmark-fastpath-fixes
codex/graphite-attribution-suite
codex/cherry-pick-hooks-perf-fix
devin/1771643297-memory-overflow-fixes
devin/1771642821-add-client-metrics-events
devin/1771599590-hooks-rebase-perf
devin/1771642594-memory-overflow-replication
fix/no-write-agent-metrics
fix/makosblade/migrate-initial-attributions
claude/fix-issue-426-buWz9
fix/misc-ci-cd-workflow-patches
feat/large-attr-perf-work
uninstall
feat/prompt-discovery
feat/cursor-tab-hooks
feat/git-diff-engine-experiments
fix/push-rewrite
fix/push
fix/mac-ci
fix/multi-push-signing-bug
wip/stats-delta-2
fix/seconds-waiting
feat/nicer-ci-stats
fix/range-stats-including-other-blames
fix/windows-initial-testing
fix/193
fix/authorship-saved-stats
feat/sentry
fix/bug-git-diff-diverges-on-duplicate-lines
fix/bug-squash
fix/rewrite-performance
fix/cursor-sqlite-prompt-race
fix/commit-single
fix/retain-all-prompts-in-authorship
feat/mockai-pathspecs
fix/time-on-initial
feat/dmp-rewrite-ops
feat/ignore-prev-ai-blame-for-perf
fix/ai-blame-file-paths-rel
fix/build-matrix
docs/update-enterprise-installation-opts
feat/agent_fmt1_preset
docs-support
fix/bare-repo-stats
fix/sync-authorship
feat/distributed-authorship
fix/pre-commit-performance2
feat/test-refactor
fix/commit-performance
feat/pop-stash-apply
feat/enterprise-allowlist
fix/conflicts-skipped
fix/merge-squash-new-method
fix/merge-squash
feat/post-commit-stats
feat/git-notes-for-authorship
fix/ai-blame-rename
fix/empty-repo
fix/unstaged-in-log
feat/git-notes-namespace
feat/local-rewrites-authorship
feat/handle-git-alias
feat/faster-checkpoints-slimmer-storage
feat/dev-env-setup
feat/cursor-hooks-auto-install
fix/ai-blame
fix/blame-issues
fix/perf
feat/cursor-preset
test
fix/pull-unplanned
fix/attribution-above-fix
feat/count-total-lines-per-prompt
feat/new-authorship-log-format
fix/windows-ci
feat/claude-cursor-presets
feat/git-compat
feat/track-squash-rebase
save-prompts
fix-git-push-rewrite
fix-linux-release
arm-linux-support
git-ai-stats-command
fix-new-files-not-getting-authorship
testing123
example123
fix/default-ref-upload
proxy
feat/proxy
fix/release-script-testing
fix/subdir-repo-not-found
cursor-extension
feat/demo-pr-comments
tests/in-ci
feat/test-suite-
fix-init
v1.3.5-next-8b86fcf
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.3.0-next-ba657b6
v1.3.0-next-a1321a5
v1.3.0-next-bacf066
v1.3.0-next-380a1f8
v1.2.8
v1.2.7
v1.2.7-next-e025db4
v1.2.7-next-f211688
v1.2.7-next-d2c85a4
v1.2.6
v1.2.5
v1.2.4
v1.2.4-next-46cbbb1
v1.2.4-next-051dfb9
v1.2.3
v1.2.2
v1.2.1
v1.1.23
v1.1.22
v1.1.21
v1.1.21-next-10b781d
v1.1.20
v1.1.20-next-2a8c946
v1.1.20-next-78623c6
v1.1.19
v1.1.18
v1.1.17
v1.1.16
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.11-next-81a4693
v1.1.10
v1.1.9
v1.1.8
v1.1.7
v1.1.7-next-7130b7a
v1.1.6
v1.1.6-next-b4b5f72
v1.1.6-next-3caf774
v1.1.5
v1.1.5-next-2d722eb
v1.1.4
v1.1.3
v1.1.2
v1.1.1-next-6ad2609
v1.1.1
v1.1.1-next-2772a32
v1.1.1-next-339d3a7
v1.0.42
v1.0.41
v1.0.40
v1.0.40-next-8d61135
v1.0.40-next-e763fe3
v1.0.39
v1.0.39-next-024d7cc
v1.0.38
v1.0.38-next-6927f27
v1.0.38-next-9863bf9
v1.0.38-next-ad241de
v1.0.37
v1.0.37-next-55ecea6
v1.0.36
v1.0.36-next-cec0576
v1.0.36-next-8b2936f
v1.0.35
v1.0.35-next-46ac366
v1.0.34
v1.0.34-next-9a90ccd
v1.0.33
v1.0.32
v1.0.32-next-b12d980
v1.0.31
v1.0.30
v1.0.30-next-29e16e1
v1.0.29
v1.0.29-next-93e7b75
v1.0.29-next-c7b2509
v1.0.29-next-7de1eb6
v1.0.29-next-c22b5ba
v1.0.28-next-2ef1b24
v1.0.28
v1.0.27
v1.0.26
v1.0.26-next-7b539aa
v1.0.26-next-3b147bf
v1.0.26-next-fca1a3c
v1.0.25
v1.0.24
v1.0.24-next-df615a7
v1.0.23
v1.0.23-next-5b6a63c
v1.0.23-next-7236db5
v1.0.23-next-96e7686
v1.0.23-next-2c08a4e
v1.0.22-next-b27457a
v1.0.22
v1.0.22-next-d75088f
v1.0.22-next-28c081b
v1.0.22-next-c39b714
v1.0.21
v1.0.21-next-06f6e8c
v1.0.20
v1.0.19
v1.0.18
v1.0.17
v1.0.16
v1.0.15
v1.0.14
v1.0.13
v1.0.12
v1.0.11
v1.0.11-prerelease
v1.0.10
v1.0.9
v1.0.8
v1.0.7
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.2.7
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.0
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
Labels
No labels
agent-support
agent-support
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
windows
working-on
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-ai#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @harvest-L on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/357
Originally assigned to: @Krishnachaitanyakc on GitHub.
Problem Description
Current git-ai doesn't properly support workspaces that contain multiple independent git repositories as subdirectories. The workspace root itself is not a git repository, but contains multiple git repositories as child directories.
Use Case
Scenario: Workspace Directory with Multiple Git Repos
Common use cases:
Current Behavior
When AI agent edits files across multiple git repositories in this workspace:
Expected Behavior
git-ai should:
Example Workflow
Environment
Current Workaround
No known workaround. Users must:
Suggested Implementation
Approach 1: Per-Directory Git Detection
Approach 2: Workspace Configuration
.git-ai-workspaceconfigApproach 3: Git Working Tree Support
git worktree- manage multiple working directoriesImpact
This is a critical feature for:
Without this support, git-ai cannot be used effectively in modern development environments where AI agents work across multiple repositories simultaneously.
@svarlamov commented on GitHub (Jan 16, 2026):
Hey @harvest-L thanks for the report! There's definitely still some rough edges when in multi-root workspaces.
Can you test this with Cursor on the latest release of git-ai? It should be fixed ref: https://github.com/acunniffe/git-ai/pull/337
As far as the other IDEs, I just wanted to double check, which ones were you able to actually replicate the issue in? I ask because this functionality is pretty IDE/agent-specific. Thanks!
@harvest-L commented on GitHub (Jan 17, 2026):
I discovered this issue in both Claude and Cursor. I'm using the latest version 1.0.35 of git-ai. The call log is
as follows:
Claude:
Edit [git-ai checkpoint claude --hook-input stdin] failed with non-blocking status code 1: Failed
to find repository: Git CLI (-C C:\Users\rog\work\my rev-parse --absolute-git-dir --show-toplevel) failed with
exit code 128: fatal: not a git repository (or any of the parent directories): .git
Cursor
{
"conversation_id": "a22c8dcf-0441-4683-888e-7c20695c2c9f",
"generation_id": "1fa5ad11-893d-4117-9ca8-96845588c6cb",
"model": "default",
"file_path": "c:\Users\rog\work\my\git-ai-stats-test\hello.js",
"edits": [
{
"old_string": "function hello() { \n console.log("Hello"); \n console.log("World");\n console.log("!");\n}",
"new_string": "function hello() { \n console.log("Hello"); \n console.log("World");\n console.log("!");\n console.log("新添加的打印");\n}"
}
],
"hook_event_name": "afterFileEdit",
"cursor_version": "2.3.35",
"workspace_roots": [
"/C:/Users/rog/work/my"
],
"user_email": ""
}
Failed to find repository: Git CLI (-C C:\Users\rog\work\my rev-parse --absolute-git-dir --show-toplevel) failed with exit code 128: fatal: not a git repository (or any of the parent directories): .git
@svarlamov commented on GitHub (Jan 18, 2026):
Thanks, I think I'm clear on the issue now. I believe the solution for this is, probably for both AI and human checkpoints, to pick the repo based on the actual file(s) that are being edited.
Example 1
Workspace:
/Users/svarlamov/projectsFile edited:
/Users/svarlamov/projects/git-ai/README.mdGit dir used: should be
/Users/svarlamov/projects/git-aiExample 2
Workspaces: [
/Users/svarlamov/projects,/Users/svarlamov/Documents]File edited:
/Users/svarlamov/projects/git-ai/README.mdGit dir used: should be
/Users/svarlamov/projects/git-aiExample 3
Workspaces: [
/Users/svarlamov/Documents]File edited:
/Users/svarlamov/projects/git-ai/README.mdGit dir used: should be:
/Users/svarlamov/projects/git-aiTest cases must verify that submodules are ignored and git dirs inside of another git dir are skipped in favor of their parent, unless the parent is above the level of the workspace (use the one at the same level or below the workspace). I'm sure there's probably more edge cases that maybe the agents can help to think of here.
@Krishnachaitanyakc Just tagging you here in case you have any interest in picking this issue up as you explore Git AI 😊
@Krishnachaitanyakc commented on GitHub (Jan 18, 2026):
@svarlamov would love to. Can you assign the issue to me?
@svarlamov commented on GitHub (Jan 18, 2026):
@Krishnachaitanyakc Sorry for the delay -- assigned. Thank you so much for taking this on. You rock! Will prioritize the review when I see the PR ❤️
@harvest-L commented on GitHub (Jan 19, 2026):
@svarlamov
Here might be another request: for the command git-ai checkpoint agent-v1, the repo_working_dir parameter is currently mandatory. If this issue is fixed, it seems this parameter could be set as optional.
Let me explain why I’m making this request:
Previously, within my company, I developed a small tool similar to git-ai, also using two checkpoints + diff. However, compared to the maturity and power of git-ai, my tool is quite limited. But my checkpoint triggering method differs from git-ai’s—I use MCP + some mandatory rules, mainly to make the AI execute this checkpoint before and after editing files. Although MCP might not be as stable as hooks, one advantage is its compatibility with most AI agents. I’ve tested it with many AI agents, and it works in most cases. Perhaps this could serve as a transitional solution in the current environment (where hooks are still not widely supported by many agents). I’ve also integrated git-ai into antigravity via MCP, and it seems to work well.
On another note, I have to say that git-ai’s promotion efforts seem lacking—otherwise, I wouldn’t have reinvented the wheel. When I tried to promote my tool internally, I realized it had too much to handle. Eventually, after searching through various search engines and AI platforms, I finally discovered git-ai. I think git-ai is an excellent product, and our company plans to use it as an efficiency tool. We currently have around 200 R&D staff.
Also, regarding the data metrics server, I noticed it’s no longer mentioned on the official website. Is it a paid service? I’d like to learn more about it and look forward to your reply.
@svarlamov commented on GitHub (Jan 19, 2026):
@harvest-L We should definitely talk! Do you have some time to chat? https://calendly.com/acunniffe/meeting-with-git-ai-authors
@harvest-L commented on GitHub (Jan 19, 2026):
@svarlamov
Thank you for your reply and the invitation to chat. I really appreciate your time.
To be honest, my English is not very good, and I rely heavily on AI tools to communicate. I’m a bit concerned that I might not be able to express myself clearly during a live conversation, and I wouldn’t want to waste your valuable time.
If possible, could you share more information about your server product via email? I’d be happy to read through it and follow up with any questions I may have.
My email is: flyharvest@yeah.net
@Krishnachaitanyakc commented on GitHub (Feb 8, 2026):
@svarlamov let's close out this issue?
@svarlamov commented on GitHub (Feb 12, 2026):
@Krishnachaitanyakc sorry for the late reply on this. @harvest-L did we get everything done here? everything working?
@svarlamov commented on GitHub (Feb 12, 2026):
Closing since it seems like this was fixed, but please ask to reopen if not