Skip to content

Commit a1d9aee

Browse files
authored
implement hands on hp-first-commit (#64)
# Exercise Review ## Exercise Discussion #52 ## 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)?
2 parents 49410f0 + f06bcaa commit a1d9aee

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

hands_on/first_commit.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
from exercise_utils.cli import run_command
3+
from exercise_utils.file import create_or_update_file
4+
from exercise_utils.git import add, init
5+
6+
__requires_git__ = True
7+
__requires_github__ = False
8+
9+
10+
def download(verbose: bool):
11+
os.makedirs("things")
12+
os.chdir("things")
13+
init(verbose)
14+
create_or_update_file(
15+
"fruits.txt",
16+
"""
17+
apples
18+
bananas
19+
cherries
20+
dragon fruits
21+
""",
22+
)
23+
add(["fruits.txt"], verbose)

0 commit comments

Comments
 (0)