mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-30 09:44:26 +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\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"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\"}},\"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": "Source of nothing",
|
||||
"zh_CN": "没有source",
|
||||
"de_DE": "Die Quelle des Nichts"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "The branch command is disabled for this level so you'll have to use fetch!",
|
||||
"zh_CN": "本节的分支命令被禁用了, 你只能使用fetch! ",
|
||||
"de_DE": "Der branch Befehl ist für diesen Level inaktiv, du musst also fetch benutzen"
|
||||
},
|
||||
"startDialog": {
|
||||
|
@ -64,6 +66,60 @@ exports.level = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"zh_CN":{
|
||||
"childViews": [
|
||||
{
|
||||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"### 奇葩的`<source>`",
|
||||
"",
|
||||
"Git abuses the `<source>` parameter in two weird ways. These two abuses come from the fact that you can technically specify \"nothing\" as a valid `source` for both git push and git fetch. The way you specify nothing is via an empty argument:",
|
||||
"有两种罕见的情况, git 不需要 `<source>`. 这基于这样一个事实-- 技术上说就是你不指定<source>. 这是通过空参数实现的",
|
||||
"",
|
||||
"* `git push origin :side`",
|
||||
"* `git fetch origin :bugFix`",
|
||||
"",
|
||||
"我们看看这是怎么进行的..."
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"如果给push传一个空参数会如何呢? 远端会删除分支! "
|
||||
],
|
||||
"afterMarkdowns": [
|
||||
"就是这样子, 我们通过给push传空值source, 成功删除了远端的`foo`分支, 这真有意思..."
|
||||
],
|
||||
"command": "git push origin :foo",
|
||||
"beforeCommand": "git clone; git push origin master:foo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"如果给fetch传空<source>, 那本地会创建一个新分支."
|
||||
],
|
||||
"afterMarkdowns": [
|
||||
"很神奇吧! 但无论怎么说, 这就是git !"
|
||||
],
|
||||
"command": "git fetch origin :bar",
|
||||
"beforeCommand": "git clone"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"快速测试 -- 删除远端的分支, 再在本地创建新的分支! "
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"de_DE": {
|
||||
"childViews": [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue