Git Fetch (host-side)
az_git_fetchRun git fetch on a local repo from the host machine when sandbox network restrictions block direct fetches, making remote branches available for local git operations.
Instructions
在主機端對本機 repo 執行 git fetch(唯讀網路操作,不動工作目錄)。典型情境:Cowork sandbox 內 git fetch 被 proxy 擋下(403)時,用此工具在主機端代跑;完成後 sandbox 內即可用本機 git 操作 origin/。不提供 push/pull 等寫入操作。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prune | No | 加 --prune,清除遠端已刪除分支的追蹤 ref | |
| remote | No | 遠端名稱,預設 origin(只接受 remote 名稱,不接受 URL) | |
| refspec | No | 要 fetch 的分支或 refspec,例如 "releases/s116/rc-092";未指定時 fetch 該 remote 的全部分支 | |
| timeout | No | 逾時秒數,預設 120 | |
| repoPath | Yes | 本機 repo 的「主機端」絕對路徑(例如 D:\mygithub\MS-Web;sandbox 內看到的路徑可能與主機不同) |