almost done

This commit is contained in:
tumh 2014-04-27 17:56:55 +08:00
parent 1d2c6a8d82
commit fc8e12bb56
11 changed files with 191 additions and 65 deletions

View file

@ -8,12 +8,14 @@ exports.level = {
"startTree": "{\"branches\":{\"master\":{\"target\":\"C5\",\"id\":\"master\"},\"overHere\":{\"target\":\"C1\",\"id\":\"overHere\"}},\"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\"},\"C5\":{\"parents\":[\"C4\"],\"id\":\"C5\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}",
"hint": {
"en_US": "you can use either branches or relative refs (HEAD~) to specify the rebase target",
"de_DE": "Du kannst entweder Branches oder relative Ref-Angaben (z.B. HEAD~) benutzen, um das Ziel des Rebase anzugeben."
"de_DE": "Du kannst entweder Branches oder relative Ref-Angaben (z.B. HEAD~) benutzen, um das Ziel des Rebase anzugeben.",
"zh_TW": "你可以指定 branch 或者是相對位置HEAD~)來表示 rebase 的目標"
},
"name": {
"en_US": "Interactive Rebase Intro",
"de_DE": "Einführung Interactive Rebase",
"zh_CN": "Rebase 交互命令介绍 "
"zh_CN": "Rebase 交互命令介绍 ",
"zh_TW": "介紹互動式的 rebase"
},
"startDialog": {
"en_US": {
@ -22,13 +24,13 @@ exports.level = {
"type": "ModalAlert",
"options": {
"markdowns": [
"## Git Interactive Rebase",
"## git interactive rebase",
"",
"Git cherry-pick is great when you know which commits you want (_and_ you know their corresponding hashes) -- it's hard to beat the simplicity it provides.",
"當你知道你要複製哪些 commit而且你也知道他們所對應的 hash 值),那麼 `git cherry-pick` 很適合你。",
"",
"But what about the situation where you don't know what commits you want? Thankfully git has you covered there as well! We can use interactive rebasing for this -- it's the best way to review a series of commits you're about to rebase.",
"但是如果你不知道你要的是哪些 commit 呢? 很幸運的是git 也有考慮到這個問題喔!我們可以用互動式的 rebase 來做到,當你想要檢查你想要的 commit 的時候,這會是最好的方法。",
"",
"Let's dive into the details..."
"讓我們來看一下這些細節..."
]
}
},
@ -36,11 +38,11 @@ exports.level = {
"type": "ModalAlert",
"options": {
"markdowns": [
"All interactive rebase means is using the `rebase` command with the `-i` option.",
"互動式的 rebase 相當於使用 rebase 這個指令的時候,後面加上一個 `-i` 的選項。",
"",
"If you include this option, git will open up a UI to show you which commits are about to be copied below the target of the rebase. It also shows their commit hashes and messages, which is great for getting a bearing on what's what.",
"如果你有包含了這個選項git 就會打開一個 UI讓你知道說有哪些 commit 會被複製下來,它也會告訴你它們的 hash 值以及可以讓你知道它們是什麼的訊息。",
"",
"For \"real\" git, the UI window means opening up a file in a text editor like `vim`. For our purposes, I've built a small dialog window that behaves the same way."
"在\"實務上\"UI 會利用一個編輯器(例如 vim打開一個檔案對於我們來說我已經設計了一個有同樣功能的對話視窗。"
]
}
},
@ -48,11 +50,11 @@ exports.level = {
"type": "ModalAlert",
"options": {
"markdowns": [
"When the interactive rebase dialog opens, you have the ability to do 3 things:",
"當互動式的 rebase 的對話視窗打開之後,你就可以做到三件事情:",
"",
"* You can reorder commits simply by changing their order in the UI (in our window this means dragging and dropping with the mouse).",
"* You can choose to completely omit some commits. This is designated by `pick` -- toggling `pick` off means you want to drop the commit.",
"* Lastly, you can squash commits. Unfortunately our levels don't support this for a few logistical reasons, so I'll skip over the details of this. Long story short, though -- it allows you to combine commits.",
"* 你可以藉由改變這些 commit 在 UI 的位置(在我們的視窗中,可以透過滑鼠去拖拉),來重新排序它們的順序。",
"* 你可以選擇完全忽略掉某些 commit可以用滑鼠按一下使它變暗就表示你要忽略掉該 commit。",
"* 最後, 你可以把 commit 合併在一起,但基於某些理由,在我們的關卡裡面並沒有這個功能。",
"",
"Great! Let's see an example."
]
@ -62,10 +64,10 @@ exports.level = {
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"When you hit the button, an interactive rebase window will appear. Reorder some commits around (or feel free to unpick some) and see the result!"
"當你按下按鈕的時候,一個互動式的 rebase 的視窗就會跳出來,重新排序一些 commit大膽忽略掉某些 commit然後看一下結果吧"
],
"afterMarkdowns": [
"Boom! Git copied down commits in the exact same way you specified through the UI"
"看吧! git 根據你所選擇的 commit把它們複製了下來。"
],
"command": "git rebase -i HEAD~4 --aboveAll",
"beforeCommand": "git commit; git commit; git commit; git commit"
@ -75,7 +77,7 @@ exports.level = {
"type": "ModalAlert",
"options": {
"markdowns": [
"To finish this level, do an interactive rebase and achieve the order shown in the goal visualization. Remember you can always `undo` or `reset` to fix mistakes :D"
"要完成這個關卡,使用互動式的 rebase並且完成視覺化目標所表示 commit 的順序,記住!你可以經常使用 `undo` 或者 `reset` 來修正你的一些錯誤:D"
]
}
}