Skip to content

Commit 20faa20

Browse files
LeeZeHaojovnc
andauthored
[hp-fetch-merge] Implement hands on T3L3/hp-fetch-merge (#99)
# Exercise Review ## Exercise Discussion #86 ## 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)? --------- Co-authored-by: jovnc <95868357+jovnc@users.noreply.github.com>
1 parent 3a051a5 commit 20faa20

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

hands_on/fetch_merge.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
3+
from exercise_utils.git import add_remote, clone_repo_with_git, remove_remote
4+
5+
__requires_git__ = True
6+
__requires_github__ = False
7+
8+
9+
def download(verbose: bool):
10+
clone_repo_with_git(
11+
"https://github.com/git-mastery/samplerepo-finances.git", verbose
12+
)
13+
os.chdir("samplerepo-finances")
14+
remove_remote("origin", verbose)
15+
add_remote(
16+
"origin", "https://github.com/git-mastery/samplerepo-finances-2", verbose
17+
)

0 commit comments

Comments
 (0)