Skip to content

Commit 7fb249e

Browse files
committed
[mix-messy-graph] Remove origin after setup
1 parent a912c07 commit 7fb249e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

exercise_utils/git.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ def push(remote: str, branch: str, verbose: bool) -> None:
7373
def track_remote_branch(remote: str, branch: str, verbose: bool) -> None:
7474
"""Tracks a remote branch locally using the same name."""
7575
run_command(["git", "branch", branch, f"{remote}/{branch}"], verbose)
76+
77+
78+
def remove_remote(remote: str, verbose: bool) -> None:
79+
"""Removes a given remote."""
80+
run_command(["git", "remote", "rm", remote], verbose)

mix_messy_graph/download.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
from exercise_utils.git import merge, merge_with_message, track_remote_branch
1+
from exercise_utils.git import (
2+
merge_with_message,
3+
remove_remote,
4+
track_remote_branch,
5+
)
26

37

48
def setup(verbose: bool = False):
59
remote_name = "origin"
610
remote_branches = ["feature-search", "feature-delete", "list"]
711
for remote_branch_name in remote_branches:
812
track_remote_branch(remote_name, remote_branch_name, verbose)
13+
remove_remote("origin", verbose)
914

1015
merge_with_message("feature-search", False, "Merge search feature", verbose)

0 commit comments

Comments
 (0)