MCPcopy Create free account
hub / github.com/modelscope/modelscope / new_branch

Method new_branch

modelscope/hub/git.py:169–171  ·  view source on GitHub ↗
(self, repo_dir: str, revision: str)

Source from the content-addressed store, hash-verified

167 return self._run_git_command('-C', repo_dir, 'checkout', revision)
168
169 def new_branch(self, repo_dir: str, revision: str):
170 return self._run_git_command('-C', repo_dir, 'checkout', '-b',
171 revision)
172
173 def get_remote_branches(self, repo_dir: str) -> List[str]:
174 rsp = self._run_git_command('-C', repo_dir, 'branch', '-r')

Callers

nothing calls this directly

Calls 1

_run_git_commandMethod · 0.95

Tested by

no test coverage detected