mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-29 22:29:40 +02:00
more intl Issue #42
This commit is contained in:
parent
eedce6616a
commit
3adec8d88a
18 changed files with 267 additions and 478 deletions
|
@ -1,17 +1,19 @@
|
|||
exports.level = {
|
||||
"compareOnlyMasterHashAgnostic": true,
|
||||
"disabledMap" : {
|
||||
"disabledMap": {
|
||||
"git revert": true
|
||||
},
|
||||
"goalTreeString": "%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C4%27%22%2C%22id%22%3A%22master%22%7D%2C%22debug%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22debug%22%7D%2C%22printf%22%3A%7B%22target%22%3A%22C3%22%2C%22id%22%3A%22printf%22%7D%2C%22bugFix%22%3A%7B%22target%22%3A%22C4%27%22%2C%22id%22%3A%22bugFix%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C4%22%3A%7B%22parents%22%3A%5B%22C3%22%5D%2C%22id%22%3A%22C4%22%7D%2C%22C4%27%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C4%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22master%22%2C%22id%22%3A%22HEAD%22%7D%7D",
|
||||
"solutionCommand": "git checkout master;git cherry-pick C4",
|
||||
"startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\"},\"debug\":{\"target\":\"C2\",\"id\":\"debug\"},\"printf\":{\"target\":\"C3\",\"id\":\"printf\"},\"bugFix\":{\"target\":\"C4\",\"id\":\"bugFix\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"},\"C4\":{\"parents\":[\"C3\"],\"id\":\"C4\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"}}",
|
||||
"name": "Grabbing Just 1 Commit",
|
||||
"name": {
|
||||
"en_US": "Grabbing Just 1 Commit"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "Remember, interactive rebase or cherry-pick is your friend here",
|
||||
"ko": "대화식 리베이스(rebase -i)나 or 체리픽(cherry-pick)을 사용하세요",
|
||||
"zh_CN": "\u8bb0\u4f4f\uff0c\u4ea4\u4e92\u5f0f rebase \u6216\u8005 cherry-pick \u4f1a\u5f88\u6709\u5e2e\u52a9"
|
||||
},
|
||||
"en_US": "Remember, interactive rebase or cherry-pick is your friend here",
|
||||
"ko": "대화식 리베이스(rebase -i)나 or 체리픽(cherry-pick)을 사용하세요",
|
||||
"zh_CN": "记住,交互式 rebase 或者 cherry-pick 会很有帮助"
|
||||
},
|
||||
"startDialog": {
|
||||
"en_US": {
|
||||
"childViews": [
|
||||
|
@ -89,7 +91,7 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"本关是可选关卡,玩不玩随便你。但是如果你坚持要刷,确保 `master` 分支能拿到 `bugFix` 分支的相关提交(references)。"
|
||||
"本关是可选关卡,玩不玩随便你。但是如果你坚持要刷,确保 `master` 分支能拿到 `bugFix` 分支的相关提交(references)。"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -101,16 +103,12 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "## Locally stacked commits",
|
||||
"## 로컬에 쌓인 커밋들",
|
||||
"",
|
||||
// "Here's a development situation that often happens: I'm trying to track down a bug but it is quite elusive. In order to aid in my detective work, I put in a few debug commands and a few print statements.",
|
||||
"개발중에 종종 이런 상황이 생깁니다: 잘 띄지 않는 버그를 찾아서 해결하려고, 어떤 부분의 문제인지를 찾기 위해 디버그용 코드와 화면에 정보를 프린트하는 코드 몇 줄 넣습니다. ",
|
||||
"",
|
||||
// "All of these debugging / print statements are in their own branches. Finally I track down the bug, fix it, and rejoice!",
|
||||
"디버깅용 코드나 프린트 명령은 그 브랜치에 들어있습니다. 마침내 버그를 찾아서 고쳤고, 원래 작업하는 브랜치에 합치면 됩니다!",
|
||||
"",
|
||||
// "Only problem is that I now need to get my `bugFix` back into the `master` branch! I could simply fast-forward `master`, but then `master` would get all my debug statements."
|
||||
"이제 `bugFix`브랜치의 내용을 `master`에 합쳐 넣으려 하지만, 한 가지 문제가 있습니다. 그냥 간단히 `master`브랜치를 최신 커밋으로 이동시킨다면(fast-forward) 그 불필요한 디버그용 코드들도 함께 들어가 버린다는 문제죠."
|
||||
]
|
||||
}
|
||||
|
@ -119,16 +117,13 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "This is where the magic of Git comes in. There are a few ways to do this, but the two most straightforward ways are:",
|
||||
"여기에서 Git의 마법이 드러납니다. 이 문제를 해결하는 여러가지 방법이 있습니다만, 가장 간단한 두가지 방법 아래와 같습니다:",
|
||||
"",
|
||||
"* `git rebase -i`",
|
||||
"* `git cherry-pick`",
|
||||
"",
|
||||
// "Interactive (the `-i`) rebasing allows you to chose which commits you want to keep or discard. It also allows you to reorder commits. This can be helpful if you want to toss out some work.",
|
||||
"대화형 (-i 옵션) 리베이스(rebase)로는 어떤 커밋을 취하거나 버릴지를 선택할 수 있습니다. 또 커밋의 순서를 바꿀 수도 있습니다. 이 커맨드로 어떤 작업의 일부만 골라내기에 유용합니다.",
|
||||
"",
|
||||
// "Cherry-picking allows you to pick individual commits and plop them down on top of `HEAD`"
|
||||
"체리픽(cherry-pick)은 개별 커밋을 골라서 `HEAD`위에 떨어뜨릴 수 있습니다."
|
||||
]
|
||||
}
|
||||
|
@ -137,7 +132,6 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "This is a later level so we will leave it up to you to decide, but in order to complete the level, make sure `master` receives the commit that `bugFix` references."
|
||||
"이번 레벨을 통과하기 위해 어떤 방법을 쓰시든 자유입니다만, `master`브랜치가 `bugFix` 브랜치의 커밋을 일부 가져오게 해주세요."
|
||||
]
|
||||
}
|
||||
|
@ -145,4 +139,4 @@ exports.level = {
|
|||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
exports.level = {
|
||||
"disabledMap" : {
|
||||
"disabledMap": {
|
||||
"git cherry-pick": true,
|
||||
"git revert": true
|
||||
},
|
||||
|
@ -7,11 +7,13 @@ exports.level = {
|
|||
"goalTreeString": "%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C3%27%27%22%2C%22id%22%3A%22master%22%7D%2C%22newImage%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22newImage%22%7D%2C%22caption%22%3A%7B%22target%22%3A%22C3%27%27%22%2C%22id%22%3A%22caption%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C3%27%22%7D%2C%22C2%27%22%3A%7B%22parents%22%3A%5B%22C3%27%22%5D%2C%22id%22%3A%22C2%27%22%7D%2C%22C2%27%27%22%3A%7B%22parents%22%3A%5B%22C3%27%22%5D%2C%22id%22%3A%22C2%27%27%22%7D%2C%22C2%27%27%27%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%27%27%27%22%7D%2C%22C3%27%27%22%3A%7B%22parents%22%3A%5B%22C2%27%27%27%22%5D%2C%22id%22%3A%22C3%27%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22master%22%2C%22id%22%3A%22HEAD%22%7D%7D",
|
||||
"solutionCommand": "git rebase -i HEAD~2;git commit --amend;git rebase -i HEAD~2;git rebase caption master",
|
||||
"startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\"},\"newImage\":{\"target\":\"C2\",\"id\":\"newImage\"},\"caption\":{\"target\":\"C3\",\"id\":\"caption\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"caption\",\"id\":\"HEAD\"}}",
|
||||
"name": "Juggling Commits",
|
||||
"name": {
|
||||
"en_US": "Juggling Commits"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "The first command is git rebase -i HEAD~2",
|
||||
"ko": "첫번째 명령은 git rebase -i HEAD~2 입니다",
|
||||
"zh_CN": "\u7b2c\u4e00\u4e2a\u547d\u4ee4\u662f 'git rebase -i HEAD~2'"
|
||||
"en_US": "The first command is git rebase -i HEAD~2",
|
||||
"ko": "첫번째 명령은 git rebase -i HEAD~2 입니다",
|
||||
"zh_CN": "第一个命令是 'git rebase -i HEAD~2'"
|
||||
},
|
||||
"startDialog": {
|
||||
"en_US": {
|
||||
|
@ -86,7 +88,7 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"啊最后还要提醒你一下最终的形式 —— 因为我们把这个提交移动了两次,所以会分别产生一个省略提交(both get an apostrophe appended)。还有一个省略提交是因为我们为了实现最终效果去修改提交而添加的。"
|
||||
"啊最后还要提醒你一下最终的形式 —— 因为我们把这个提交移动了两次,所以会分别产生一个省略提交(both get an apostrophe appended)。还有一个省略提交是因为我们为了实现最终效果去修改提交而添加的。"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -98,13 +100,10 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "## Juggling Commits",
|
||||
"## 커밋들 갖고 놀기",
|
||||
"",
|
||||
// "Here's another situation that happens quite commonly. You have some changes (`newImage`) and another set of changes (`caption`) that are related, so they are stacked on top of each other in your repository (aka one after another).",
|
||||
"이번에도 꽤 자주 발생하는 상황입니다. `newImage`와 `caption` 브랜치에 각각의 변경내역이 있고 서로 약간 관련이 있어서, 저장소에 차례로 쌓여있는 상황입니다.",
|
||||
"",
|
||||
// "The tricky thing is that sometimes you need to make a small modification to an earlier commit. In this case, design wants us to change the dimensions of `newImage` slightly, even though that commit is way back in our history!!"
|
||||
"때로는 이전 커밋의 내용을 살짝 바꿔야하는 골치아픈 상황에 빠지게 됩니다. 이번에는 디자인 쪽에서 우리의 작업이력(history)에서는 이미 한참 전의 커밋 내용에 있는 `newImage`의 크기를 살짝 바꿔달라는 요청이 들어왔습니다."
|
||||
]
|
||||
}
|
||||
|
@ -113,19 +112,13 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "We will overcome this difficulty by doing the following:",
|
||||
"이 문제를 다음과 같이 풀어봅시다:",
|
||||
"",
|
||||
// "* We will re-order the commits so the one we want to change is on top with `git rebase -i`",
|
||||
"* `git rebase -i` 명령으로 우리가 바꿀 커밋을 가장 최근 순서로 바꾸어 놓습니다",
|
||||
// "* We will `commit --amend` to make the slight modification",
|
||||
"* `commit --amend` 명령으로 커밋 내용을 정정합니다",
|
||||
// "* Then we will re-order the commits back to how they were previously with `git rebase -i`",
|
||||
"* 다시 `git rebase -i` 명령으로 이 전의 커밋 순서대로 되돌려 놓습니다",
|
||||
// "* Finally, we will move master to this updated part of the tree to finish the level (via your method of choosing)",
|
||||
"* 마지막으로, master를 지금 트리가 변경된 부분으로 이동합니다. (편하신 방법으로 하세요)",
|
||||
"",
|
||||
// "There are many ways to accomplish this overall goal (I see you eye-ing cherry-pick), and we will see more of them later, but for now let's focus on this technique."
|
||||
"이 목표를 달성하기 위해서는 많은 방법이 있는데요(체리픽을 고민중이시죠?), 체리픽은 나중에 더 살펴보기로 하고, 우선은 위의 방법으로 해결해보세요."
|
||||
]
|
||||
}
|
||||
|
@ -134,7 +127,6 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "Lastly, pay attention to the goal state here -- since we move the commits twice, they both get an apostrophe appended. One more apostrophe is added for the commit we amend, which gives us the final form of the tree "
|
||||
"최종적으로, 목표 결과를 눈여겨 보세요 -- 우리가 커밋을 두 번 옮겼기 때문에, 두 커밋 모두 따옴표 표시가 붙어있습니다. 정정한(amend) 커밋은 따옴표가 추가로 하나 더 붙어있습니다."
|
||||
]
|
||||
}
|
||||
|
@ -142,5 +134,4 @@ exports.level = {
|
|||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
};
|
|
@ -1,16 +1,18 @@
|
|||
exports.level = {
|
||||
"goalTreeString": "%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C3%27%22%2C%22id%22%3A%22master%22%7D%2C%22newImage%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22newImage%22%7D%2C%22caption%22%3A%7B%22target%22%3A%22C3%22%2C%22id%22%3A%22caption%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C2%27%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%27%22%7D%2C%22C2%27%27%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%27%27%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C2%27%27%22%5D%2C%22id%22%3A%22C3%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22master%22%2C%22id%22%3A%22HEAD%22%7D%7D",
|
||||
"solutionCommand": "git checkout master;git cherry-pick C2;git commit --amend;git cherry-pick C3",
|
||||
"disabledMap" : {
|
||||
"disabledMap": {
|
||||
"git revert": true
|
||||
},
|
||||
"startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\"},\"newImage\":{\"target\":\"C2\",\"id\":\"newImage\"},\"caption\":{\"target\":\"C3\",\"id\":\"caption\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"caption\",\"id\":\"HEAD\"}}",
|
||||
"compareOnlyMaster": true,
|
||||
"name": "Juggling Commits #2",
|
||||
"name": {
|
||||
"en_US": "Juggling Commits #2"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "Don't forget to forward master to the updated changes!",
|
||||
"ko": "master를 변경 완료한 커밋으로 이동(forward)시키는 것을 잊지 마세요!",
|
||||
"zh_CN": "\u522b\u5fd8\u8bb0\u4e86\u5c06 master \u5feb\u8fdb\u5230\u6700\u65b0\u7684\u66f4\u65b0\u4e0a\uff01"
|
||||
"en_US": "Don't forget to forward master to the updated changes!",
|
||||
"ko": "master를 변경 완료한 커밋으로 이동(forward)시키는 것을 잊지 마세요!",
|
||||
"zh_CN": "别忘记了将 master 快进到最新的更新上!"
|
||||
},
|
||||
"startDialog": {
|
||||
"en_US": {
|
||||
|
@ -101,16 +103,12 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "## Juggling Commits #2",
|
||||
"## 커밋 갖고 놀기 #2",
|
||||
"",
|
||||
// "*If you haven't completed Juggling Commits #1 (the previous level), please do so before continuing*",
|
||||
"*만약 이전 레벨의 커밋 갖고 놀기 #1을 풀지 않으셨다면, 계속하기에 앞서서 꼭 풀어보세요*",
|
||||
"",
|
||||
// "As you saw in the last level, we used `rebase -i` to reorder the commits. Once the commit we wanted to change was on top, we could easily --amend it and re-order back to our preferred order.",
|
||||
"이전 레벨에서 보셨듯이 `rebase -i` 명령으로 커밋의 순서를 바꿀 수 있습니다. 정정할 커밋이 바로 직전(top)에 있으면 간단히 --amend로 수정할 수 있고, 그리고 나서 다시 원하는 순서로 되돌려 놓으면 됩니다.",
|
||||
"",
|
||||
// "The only issue here is that there is a lot of reordering going on, which can introduce rebase conflicts. Let's look at another method with `git cherry-pick`"
|
||||
"이번에 한가지 문제는 순서를 꽤 많이 바꿔야한다는 점인데요, 그러다가 리베이스중에 충돌이 날 수 있습니다. 이번에는 다른 방법인 `git cherry-pick`으로 해결해 봅시다."
|
||||
]
|
||||
}
|
||||
|
@ -119,14 +117,11 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
// "Remember that git cherry-pick will plop down a commit from anywhere in the tree onto HEAD (as long as that commit isn't upstream).",
|
||||
"git cherry-pick으로 HEAD에다 어떤 커밋이든 떨어 뜨려 놓을 수 있다고 알려드린것 기억나세요? (단, 그 커밋이 현재 가리키고 있는 커밋이 아니어야합니다)",
|
||||
"",
|
||||
// "Here's a small refresher demo:"
|
||||
"간단한 데모로 다시 알려드리겠습니다:"
|
||||
],
|
||||
"afterMarkdowns": [
|
||||
// "Nice! Let's move on"
|
||||
"좋아요! 계속할게요"
|
||||
],
|
||||
"command": "git cherry-pick C2",
|
||||
|
@ -137,7 +132,6 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
// "So in this level, let's accomplish the same objective of amending `C2` once but avoid using `rebase -i`. I'll leave it up to you to figure it out! :D"
|
||||
"그럼 이번 레벨에서는 아까와 마찬가지로 `C2` 커밋의 내용을 정정하되, `rebase -i`를 쓰지 말고 해보세요. ^.~"
|
||||
]
|
||||
}
|
||||
|
@ -145,4 +139,4 @@ exports.level = {
|
|||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue