MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / create_branch

Function create_branch

scripts/generate_content_pr.py:375–381  ·  view source on GitHub ↗

Create and checkout a new git branch.

(branch_name: str)

Source from the content-addressed store, hash-verified

373
374
375def create_branch(branch_name: str) -> bool:
376 """Create and checkout a new git branch."""
377 code, _, err = run_git(["checkout", "-b", branch_name])
378 if code != 0:
379 print(f"ERROR: Failed to create branch '{branch_name}': {err}")
380 return False
381 return True
382
383
384def commit_files(files: list[Path], message: str) -> bool:

Callers 1

process_updatesFunction · 0.85

Calls 1

run_gitFunction · 0.85

Tested by

no test coverage detected