Skip to content

Commit aa3c4a4

Browse files
[utils] add utility function to delete remote tracking branch
1 parent ea90d90 commit aa3c4a4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

exercise_utils/git.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,7 @@ def clone_repo_with_git(
9898
run(["git", "clone", repository_url, name], verbose)
9999
else:
100100
run(["git", "clone", repository_url], verbose)
101+
102+
def delete_remote_tracking_branch_locally(remote: str, branch: str, verbose: bool) -> None:
103+
"""Deletes a remote-tracking branch reference locally"""
104+
run_command(["git", "branch", "-dr", f"{remote}/{branch}"], verbose)

0 commit comments

Comments
 (0)