Skip to content

Commit 9aa86dc

Browse files
committed
Implement hands on hp-list-commits
1 parent b13523c commit 9aa86dc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

hands_on/list_commits.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os
2+
3+
from exercise_utils.file import append_to_file
4+
from exercise_utils.git import add, commit, 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+
14+
init(verbose)
15+
16+
append_to_file(
17+
"fruits.txt",
18+
"apples\nbananas\ncherries\ndragon fruits\n"
19+
)
20+
21+
add(["fruits.txt"], verbose)
22+
commit("Add fruits.txt", verbose)

0 commit comments

Comments
 (0)