Get current git branch name.
(self)
| 83 | self.tick() |
| 84 | |
| 85 | def get_current_branch(self) -> str: |
| 86 | """Get current git branch name.""" |
| 87 | c = cmd.run(["git", "rev-parse", "--abbrev-ref", "HEAD"]) |
| 88 | if c.return_code != 0: |
| 89 | raise exceptions.GitCommandError(c.err) |
| 90 | return c.out.strip() |
| 91 | |
| 92 | def create_tag( |
| 93 | self, tag: str, message: str | None = None, annotated: bool | None = None |
no outgoing calls