Skip to content

Commit d0a202a

Browse files
authored
Update hands-on practicals to use main (#182)
# Exercise Review ## Exercise Discussion Fix #180 ## Checklist - [ ] If you require a new remote repository on the `Git-Mastery` organization, have you [created a request](https://github.com/git-mastery/exercises/issues/new?template=request_exercise_repository.md) for it? - [ ] Have you written unit tests using [`repo-smith`](https://github.com/git-mastery/repo-smith) to validate the exercise grading scheme? - [X] Have you tested the download script using `test-download.sh`? - [X] Have you verified that this exercise does not already exist or is not currently in review? - [ ] Did you introduce a new grading mechanism that should belong to [`git-autograder`](https://github.com/git-mastery/git-autograder)? - [ ] Did you introduce a new dependency that should belong to [`app`](https://github.com/git-mastery/app)?
1 parent 600ba7c commit d0a202a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

hands_on/add_files.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22

3-
from exercise_utils.cli import run_command
3+
from exercise_utils.git import init
4+
45

56
__requires_git__ = True
67
__requires_github__ = False
@@ -9,4 +10,4 @@
910
def download(verbose: bool):
1011
os.makedirs("things")
1112
os.chdir("things")
12-
run_command(["git", "init", "--initial-branch=main"], verbose)
13+
init(verbose)

hands_on/force_push.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ def download(verbose: bool):
2626
f"https://github.com/{get_github_username(verbose)}/{REPO_NAME}",
2727
verbose,
2828
)
29-
run_command(["git", "push", "-u", "origin", "master"], verbose)
29+
run_command(["git", "push", "-u", "origin", "main"], verbose)

hands_on/sync_upstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ def download(verbose: bool):
3232
os.chdir(LOCAL_DIR)
3333

3434
run_command(["git", "reset", "--hard", "HEAD~2"], verbose)
35-
run_command(["git", "push", "-f", "origin", "master"], verbose)
35+
run_command(["git", "push", "-f", "origin", "main"], verbose)

0 commit comments

Comments
 (0)