Skip to content

Commit 606e86b

Browse files
Remove set-upstream
1 parent c7fcfeb commit 606e86b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

exercise_utils/git.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,9 @@ def init(verbose: bool) -> None:
7070
run_command(["git", "init", "--initial-branch=main"], verbose)
7171

7272

73-
def push(remote: str, branch: str, verbose: bool, set_upstream: bool = False) -> None:
73+
def push(remote: str, branch: str, verbose: bool) -> None:
7474
"""Push the given branch on the remote."""
75-
if set_upstream:
76-
run_command(["git", "push", "--set-upstream", remote, branch], verbose)
77-
else:
78-
run_command(["git", "push", remote, branch], verbose)
75+
run_command(["git", "push", remote, branch], verbose)
7976

8077

8178
def track_remote_branch(remote: str, branch: str, verbose: bool) -> None:

hands_on/remote_branch_pull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ def download(verbose: bool):
4141
add(["employees.txt"], verbose)
4242
commit("Add Pam to employees.txt", verbose)
4343

44-
push("origin", "hiring", verbose, True)
44+
push("origin", "hiring", verbose)
4545

0 commit comments

Comments
 (0)