stubber.basicgit
¶
simple Git module, where needed via powershell
Module Contents¶
Functions¶
|
run a external (git) command in the repo's folder and deal with some of the errors |
|
git clone --depth 0 <remote> <directory> |
|
get the most recent git version tag of a local repo |
|
checkout a specific git tag |
|
Checkout a specific commit |
|
get the most recent git version tag of a local repo" |
|
get the most recent git version tag of a local repo" |
|
fetches a repo |
|
pull a repo origin into main |
- stubber.basicgit._run_git(cmd: List[str], repo: Optional[str] = None, expect_stderr=False, capture_output=True)¶
run a external (git) command in the repo’s folder and deal with some of the errors
- stubber.basicgit.clone(remote_repo: str, path: pathlib.Path, shallow=False) bool ¶
git clone –depth 0 <remote> <directory>
- Parameters
remote_repo (str) –
path (pathlib.Path) –
- Return type
- stubber.basicgit.get_tag(repo: Optional[str] = None, abbreviate: bool = True) Union[str, None] ¶
get the most recent git version tag of a local repo repo should be in the form of : repo = “./micropython”
returns the tag or None
- stubber.basicgit.checkout_tag(tag: str, repo: Optional[str] = None) bool ¶
checkout a specific git tag
- stubber.basicgit.checkout_commit(commit_hash: str, repo: Optional[str] = None) bool ¶
Checkout a specific commit
- stubber.basicgit.switch_tag(tag: str, repo: Optional[str] = None) bool ¶
get the most recent git version tag of a local repo” repo should be in the form of : path/.git repo = ‘../micropython/.git’ returns the tag or None
- stubber.basicgit.switch_branch(branch: str, repo: Optional[str] = None) bool ¶
get the most recent git version tag of a local repo” repo should be in the form of : path/.git repo = ‘../micropython/.git’ returns the tag or None