MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / switch_branch

Method switch_branch

tests/utils.py:72–76  ·  view source on GitHub ↗

Switch to given branch.

(self, branch: str)

Source from the content-addressed store, hash-verified

70 raise exceptions.GitCommandError(c.err)
71
72 def switch_branch(self, branch: str) -> None:
73 """Switch to given branch."""
74 c = cmd.run(["git", "switch", branch])
75 if c.return_code != 0:
76 raise exceptions.GitCommandError(c.err)
77
78 def merge_branch(self, branch: str) -> None:
79 """Merge given branch into current branch."""

Calls

no outgoing calls