mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-06 04:34:29 +02:00
parent
c029a5876f
commit
f0913d4e4c
16 changed files with 1197 additions and 7 deletions
|
@ -4,10 +4,12 @@ exports.level = {
|
|||
"startTree": "{\"branches\":{\"master\":{\"target\":\"C6\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"foo\":{\"target\":\"C4\",\"id\":\"foo\",\"remoteTrackingBranchID\":\"o/foo\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null},\"o/foo\":{\"target\":\"C1\",\"id\":\"o/foo\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"},\"C4\":{\"parents\":[\"C2\",\"C3\"],\"id\":\"C4\"},\"C5\":{\"parents\":[\"C2\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C5\"],\"id\":\"C6\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":null},\"foo\":{\"target\":\"C1\",\"id\":\"foo\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}}",
|
||||
"name": {
|
||||
"en_US": "Git push arguments -- Expanded!",
|
||||
"zh_CN": "Git push 参数2!",
|
||||
"de_DE": "Optionen fü Git Push -- noch mehr!"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "Remember you can admit defeat and type in \"show solution\" :P",
|
||||
"zh_CN": "如果你失败了, 可以通过 \"show solution\" 找到解决方案 :P",
|
||||
"de_DE": "Vergiss nicht dass du aufgeben kannst, indem du \"show solution\" eingibst :P"
|
||||
},
|
||||
"startDialog": {
|
||||
|
@ -81,6 +83,76 @@ exports.level = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"zh_CN":{
|
||||
"childViews": [
|
||||
{
|
||||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"## `<place>` argument details",
|
||||
"",
|
||||
"还记得之前课程说的吧, 当为git push 指定master为place时,我们可以设置 要提交的来源 和 提交到目的地. ",
|
||||
"",
|
||||
"你可能想知道-- 如果来源和目的地不一样呢? ",
|
||||
"",
|
||||
"好吧, 很不幸git 不可能做到... 只是个玩笑! 当然是可能的啦:)... git拥有超强的灵活性(几乎不能再多了) ",
|
||||
"",
|
||||
"我们看看下一个幻灯片..."
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"要为<place> 指定 source 和 destination, 只需要用冒号`:`将二者联结.",
|
||||
"",
|
||||
"`git push origin <source>:<destination>`",
|
||||
"",
|
||||
"这通常被称为<colon refspec>, refspec是一个奇特的名-- 用于git 能识别的位置(比如分支foo 或者 HEAD~1) ",
|
||||
"",
|
||||
"一旦你指定了独立的来源和目的地, 你就可以得到花哨而精确的远程命令, 让我们看看演示! "
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"记住, `source` 是git 能理解任何位置:"
|
||||
],
|
||||
"afterMarkdowns": [
|
||||
" 这是个很迷幻的命令, 但它是合理的 -- git 将foo^解析 为位置, 上传新提交到远端的目的地. "
|
||||
],
|
||||
"command": "git push origin foo^:master",
|
||||
"beforeCommand": "git clone; go -b foo; git commit; git commit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"如果你要push到的destination不存在呢? 没问题! git 会在远端为你创建这个分支!"
|
||||
],
|
||||
"afterMarkdowns": [
|
||||
"甜蜜吧! 干得漂亮!:D"
|
||||
],
|
||||
"command": "git push origin master:newBranch",
|
||||
"beforeCommand": "git clone; git commit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"本节练习, 试着达到可视窗口展示的目标, 记住参数格式哟:",
|
||||
"",
|
||||
"`<source>:<destination>`"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"de_DE": {
|
||||
"childViews": [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue