A way to refresh Git status #48583
Replies: 2 comments 4 replies
-
|
I am seeing this where i have an agent running across multiple repos, and it edits inside one and the zed session in there get thoroughly confused by the external agents edits. Its really frustrating behavior. Probably the most frustrating thing i have encountered with Zed. |
Beta Was this translation helpful? Give feedback.
-
|
You can create a task that does this // tasks.json
[
{
"label": "Refresh Git Index",
"command": "git",
"args": ["update-index", "--force-write-index"],
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "no_focus",
"hide": "never",
"show_summary": false,
"show_command": false,
"save": "none"
}
]And then create a keybind for that task // keymap.json
[
{
"context": "Workspace",
"bindings": {
"cmd-alt-g": ["task::Spawn", { "task_name": "Refresh Git Index" }]
}
}
] |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Body
First of all, thanks for you work!
What are you proposing?
Have an option to refresh the shown Git status
Why does this matter?
To keep Git status faithful to what it is and prevent wrong actions
What problem does this solve?
Frequently when I rebase my branch the status shown on the Git dock once I push doesn't reflect the actual Git status. On this occasion for example (picture below) the branch was pulled and the real status was that there was nothing pending, but the dock didn't reflect that.

Are there any examples or context?
Given above
Screenshots, mockups, workflows, or examples from other tools.
Also given above
Possible approach
Either an option on the three dots menu on Git dock to refresh Git status or some automated way to do that from time to time, like as it happens on vscode for example.
Beta Was this translation helpful? Give feedback.
All reactions