Final merge for Issue #165 PR #165

This commit is contained in:
hilojack 2014-03-03 15:45:27 +08:00 committed by Peter Cottle
parent c029a5876f
commit f0913d4e4c
16 changed files with 1197 additions and 7 deletions

View file

@ -12,7 +12,8 @@ exports.level = {
},
"name": {
"en_US": "Interactive Rebase Intro",
"de_DE": "Einführung Interactive Rebase"
"de_DE": "Einführung Interactive Rebase",
"zh_CN": "Rebase 交互命令介绍 "
},
"startDialog": {
"en_US": {
@ -80,6 +81,72 @@ exports.level = {
}
]
},
"zh_CN": {
"childViews": [
{
"type": "ModalAlert",
"options": {
"markdowns": [
"## Git Interactive Rebase",
"",
"如果你知道你所需要的提交对象(相应的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.",
"但是如果你不清楚你想要的提交对象的hash呢? 幸好git 帮你想到了这一点, 我们可以利用交互rebase -- 如果你想衍合一系列的提交, 这就是最方便的方法了",
"",
"让我们看看细节.."
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"交互式rebase 指的是rebase 后跟一个参数: `-i`",
"",
"如果你包含了这个选项, git 会开启一个UI 并 展示出将要被复制到目标的提交对象, 它也会显示它们的提交hash 和 信息",
"",
"真实的git , UI 窗口指的是在类似于vim的文本编辑器中打开一个文件. 考虑到我们的目标, 我建立了一个小型的会话窗口以完成相同的事儿."
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"当rebase会话窗口打开时, 你能做3件事:",
"",
"* 你可以在UI中做 提交对象的排序(在我们的窗口中, 这意味着你可以拖放完成这点)",
"* 你可以忽略某些提交 -- pick 会变暗",
"* 最后, 你可以合并提交. 遗憾的是我们的课程不支持此功能.",
"",
"好! 看看例子"
]
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"当你点这个按钮时, 一个交互式的rebase窗口就会出现. 对提交对象做个排序, 再看看结果"
],
"afterMarkdowns": [
"按照你指定的方式, git 克隆了这些提交"
],
"command": "git rebase -i HEAD~4 --aboveAll",
"beforeCommand": "git commit; git commit; git commit; git commit"
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"要完成本节, 做一个交互式的rebase , 实现虚拟目标窗口中提示的提交顺序. 记住, 你随时都可以用`undo`, `reset`修复你的错误"
]
}
}
]
},
"de_DE": {
"childViews": [
{