MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / getDefaultBranch

Function getDefaultBranch

packages/cli/src/utils/git.ts:48–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47/** @returns The git config value of "init.defaultBranch". If it is not set, returns "main". */
48const getDefaultBranch = () => {
49 const stdout = execSync("git config --global init.defaultBranch || echo main").toString().trim();
50
51 return stdout;
52};
53
54// This initializes the Git-repository for the project
55export const initializeGit = async (projectDir: string) => {

Callers 1

initializeGitFunction · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…