MCPcopy Index your code
hub / github.com/anomalyco/opencode / branch

Function branch

packages/core/test/fixture/git.ts:39–45  ·  view source on GitHub ↗
(source: string, name: string, content: string)

Source from the content-addressed store, hash-verified

37}
38
39export async function branch(source: string, name: string, content: string) {
40 await git(source, "checkout", "-b", name)
41 await fs.writeFile(path.join(source, "README.md"), content)
42 await git(source, "add", "README.md")
43 await git(source, "commit", "-m", name)
44 await git(source, "push", "-u", "origin", name)
45}
46
47export async function git(cwd: string, ...args: string[]) {
48 await exec("git", args, { cwd })

Callers 3

git.test.tsFile · 0.90
TabNavItemFunction · 0.85
PromptWorkspaceSelectorFunction · 0.85

Calls 1

gitFunction · 0.70

Tested by

no test coverage detected