Skip to content

Commit f7f7db5

Browse files
feat: Implement add_origin utils in Git wrapper
1 parent b13523c commit f7f7db5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

exercise_utils/git.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def merge(target_branch: str, ff: bool, verbose: bool) -> None:
4848

4949

5050
def merge_with_message(
51-
target_branch: str, ff: bool, message: str, verbose: bool
51+
target_branch: str, ff: bool, message: str, verbose: bool
5252
) -> None:
5353
"""Merges the current branch with the target one."""
5454
if ff:
@@ -78,3 +78,8 @@ def track_remote_branch(remote: str, branch: str, verbose: bool) -> None:
7878
def remove_remote(remote: str, verbose: bool) -> None:
7979
"""Removes a given remote."""
8080
run_command(["git", "remote", "rm", remote], verbose)
81+
82+
83+
def add_origin(remote: str, verbose: bool) -> None:
84+
"""Adds the origin remote with the given URL."""
85+
run_command(["git", "remote", "add", "origin", remote], verbose)

0 commit comments

Comments
 (0)