MCPcopy Create free account
hub / github.com/IAmUnbounded/devctx / getCurrentBranch

Function getCurrentBranch

devctx/src/core/git.ts:5–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3const git = simpleGit();
4
5export async function getCurrentBranch(): Promise<string> {
6 const branch = await git.revparse(["--abbrev-ref", "HEAD"]);
7 return branch.trim();
8}
9
10export async function getRepoName(): Promise<string> {
11 const remote = await git.remote(["get-url", "origin"]).catch(() => null);

Callers 10

mcp-server.tsFile · 0.90
compressCommandFunction · 0.90
watchCommandFunction · 0.90
diffCommandFunction · 0.90
resumeCommandFunction · 0.90
saveCommandFunction · 0.90
summarizeCommandFunction · 0.90
suggestCommandFunction · 0.90
logCommandFunction · 0.90
handoffCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected