mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-30 17:54:28 +02:00
correct chinese grammar and syntax
This commit is contained in:
parent
5cd22772ac
commit
3e7e1e66c6
5 changed files with 56 additions and 56 deletions
|
@ -5,7 +5,7 @@ exports.level = {
|
||||||
"ja": "Gitのコミット",
|
"ja": "Gitのコミット",
|
||||||
'ko': 'Git 커밋 소개',
|
'ko': 'Git 커밋 소개',
|
||||||
'zh_CN': 'Git Commits简介'
|
'zh_CN': 'Git Commits简介'
|
||||||
'zh_TW': 'Git Commits簡介'
|
'zh_TW': 'Git Commit 簡介'
|
||||||
},
|
},
|
||||||
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C3\",\"id\":\"master\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}",
|
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C3\",\"id\":\"master\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}",
|
||||||
"solutionCommand": "git commit;git commit",
|
"solutionCommand": "git commit;git commit",
|
||||||
|
@ -251,13 +251,13 @@ exports.level = {
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"## Git Commits",
|
"## Git Commits",
|
||||||
"一個commit在git repository中會記錄目錄下所有文件的快照。感覺像是大量的複製和貼上,但 git 的速度更快!",
|
"一個 commit 在git repository 中會記錄目錄下所有文件的快照。感覺像是大量的複製和貼上,但 git 的速度更快!",
|
||||||
"",
|
"",
|
||||||
"Git希望commit儘可能地不占空間,所以每次進行commit的時候,它不會單純地複製整個目錄。實際上它把每次commit視為從目前的版本到下一個版本的變化量,或者說一個\"(delta)\"。",
|
"Git 希望 commit 儘可能地不占空間,所以每次進行 commit 的時候,它不會單純地複製整個目錄。實際上它把每次 commit 視為從目前的版本到下一個版本的變化量,或者說一個 \"(delta)\"。",
|
||||||
"",
|
"",
|
||||||
"Git會保存commit的歷史紀錄,所以,絕大部分的commit的上面都會有ancestor commit,在我們的圖形表示中,箭頭表示從parent commit到所對應的childer commit,保存這樣子的一個歷史紀錄是非常有用的。",
|
" Git 會保存 commit 的歷史紀錄,所以,絕大部分的 commit 的上面都會有 ancestor commit,在我們的圖形表示中,箭頭方向表示從 parent commit 到所對應的 child commit,保存這樣子的一個歷史紀錄是非常有用的。",
|
||||||
"",
|
"",
|
||||||
"要學的東西有很多,但現在你可以把commit當作是當下的project的快照。commit不占空間且可以快速切換!"
|
"要學的東西有很多,但現在你可以把 commit 當作是當下的 project 的快照。commit 不占空間且可以快速切換!"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -265,13 +265,13 @@ exports.level = {
|
||||||
"type": "GitDemonstrationView",
|
"type": "GitDemonstrationView",
|
||||||
"options": {
|
"options": {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"在實例中學習commit。右邊是一個(小)git repository。當前有兩個commit—— initial commit`C0`以及`C1`這個一個commit來表示之後可能的一些修改。",
|
"在實例中學習 commit。右邊是一個(小)git repository。當前有兩個 commit —— initial commit `C0` 以及 `C1` 這個一個 commit 來表示之後可能的一些修改。",
|
||||||
"",
|
"",
|
||||||
"點擊下面的按鈕生成新的commit。"
|
"點擊下面的按鈕生成新的 commit。"
|
||||||
],
|
],
|
||||||
"command": "git commit",
|
"command": "git commit",
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"看吧!很厲害!我們對於原始碼做了一些修改,並且把這些修改表示成一個commit。剛剛做的commit `C2`有一個parent commit `C1`,代表此次修改的參考基準點。"
|
"看吧!很厲害!我們對於文件做了一些修改,並且把這些修改表示成一個 commit。剛剛做的 commit `C2` 有一個 parent commit `C1`,代表此次修改是從那裡過來的。"
|
||||||
],
|
],
|
||||||
"beforeCommand": ""
|
"beforeCommand": ""
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"接下來你可以隨便測試。當目前的視窗結束之後,完成兩次commit就可以過關!"
|
"接下來你可以隨便測試。當目前的視窗關閉之後,輸入兩次 commit 就可以過關!"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ exports.level = {
|
||||||
"hint": {
|
"hint": {
|
||||||
"en_US": "Use the label (hash) on the commit for help!",
|
"en_US": "Use the label (hash) on the commit for help!",
|
||||||
"zh_CN": "使用提交记录上的标签(hash)来求助!",
|
"zh_CN": "使用提交记录上的标签(hash)来求助!",
|
||||||
"zh_TW": "使用commit上的標籤(hash)來幫助你!"
|
"zh_TW": "使用 commit 上的標籤(hash)來幫助你!"
|
||||||
},
|
},
|
||||||
"startDialog": {
|
"startDialog": {
|
||||||
"en_US": {
|
"en_US": {
|
||||||
|
@ -175,11 +175,11 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"## 在Git中前後移動",
|
"## 在 Git 中前後移動",
|
||||||
"",
|
"",
|
||||||
"在接觸Git的更多進階的主題之前,我們先學習用不同的方法在代表你的project的commit tree上面移動。",
|
"在接觸 Git 的更多進階的主題之前,我們先學習用不同的方法在你的 project 中的 commit tree 上面移動。",
|
||||||
"",
|
"",
|
||||||
"一旦能夠熟練地在commit tree中遊走,你使用其他git指令的威力也會更強!",
|
"一旦能夠熟練地在 commit tree 中隨意地移動,你使用其它的 git 指令的也會更厲害!",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
@ -194,11 +194,11 @@ exports.level = {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"## HEAD",
|
"## HEAD",
|
||||||
"",
|
"",
|
||||||
"我們首先看一下\"HEAD\". HEAD是一個參考,它是指向目前所checkout的commit -- 基本上,其實就是你目前所在的commit。",
|
"我們首先看一下 \"HEAD\",HEAD 是一個參考,它是指向目前所 checkout 的 commit -- 基本上,其實就是你目前所在的 commit。",
|
||||||
"",
|
"",
|
||||||
"在working tree中,HEAD總是指向最近的一次commit。大部份git的指令如果要修改working tree的狀態的話,都會先改變HEAD所指向的參考。",
|
"在 working tree 中,HEAD 總是指向最近的一次commit。大部份 git 的指令如果要修改 working tree 的狀態的話,都會先改變 HEAD 所指向的參考。",
|
||||||
"",
|
"",
|
||||||
"HEAD通常指向一個分支的名稱(比如bugFix)。當你commit的時候,改變了bugFix的狀態,這一個變化可以從HEAD的改變中看到。"
|
"HEAD 通常指向一個分支的名稱(比如 bugFix)。當你 commit 的時候,改變了 bugFix 的狀態,這一個變化可以從 HEAD 的改變中看到。"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -206,10 +206,10 @@ exports.level = {
|
||||||
"type": "GitDemonstrationView",
|
"type": "GitDemonstrationView",
|
||||||
"options": {
|
"options": {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"在實際的例子中。我們將會觀察commit前後HEAD的位置。"
|
"在實際的例子中。我們將會觀察 commit 前後 HEAD 的位置。"
|
||||||
],
|
],
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"看吧! HEAD一直藏在`master`分支的後面。"
|
"看吧! HEAD 一直藏在 `master` 分支的後面。"
|
||||||
],
|
],
|
||||||
"command": "git checkout C1; git checkout master; git commit; git checkout C2",
|
"command": "git checkout C1; git checkout master; git commit; git checkout C2",
|
||||||
"beforeCommand": ""
|
"beforeCommand": ""
|
||||||
|
@ -221,7 +221,7 @@ exports.level = {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"### 分離 HEAD",
|
"### 分離 HEAD",
|
||||||
"",
|
"",
|
||||||
"分離HEAD就是讓其指向一個commit而不是分支的名稱。這是命令執行之前的樣子: ",
|
"分離 HEAD 就是讓其指向一個 commit 而不是分支的名稱。這是命令執行之前的樣子: ",
|
||||||
"",
|
"",
|
||||||
"HEAD -> master -> C1",
|
"HEAD -> master -> C1",
|
||||||
""
|
""
|
||||||
|
@ -239,9 +239,9 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"想要完成這一個關卡,從`bugFix`分離出HEAD並且讓它指向一個commit。",
|
"想要完成這一個關卡,從 `bugFix` 分離出HEAD並且讓它指向一個 commit。",
|
||||||
"",
|
"",
|
||||||
"通過hash值可以指定commit。每個commit的hash值顯示在各自的圓圈中。"
|
"通過 hash 值可以指定 commit。每個 commit 的 hash 值顯示在各自的圓圈中。"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@ exports.level = {
|
||||||
"name": {
|
"name": {
|
||||||
"en_US": "Relative Refs (^)",
|
"en_US": "Relative Refs (^)",
|
||||||
"zh_CN": "相对引用(^)",
|
"zh_CN": "相对引用(^)",
|
||||||
"zh_TW": "相對引用(^)"
|
"zh_TW": "相對引用(^)"
|
||||||
},
|
},
|
||||||
"hint": {
|
"hint": {
|
||||||
"en_US": "Remember the Caret (^) operator!",
|
"en_US": "Remember the Caret (^) operator!",
|
||||||
"zh_CN": "记住插入(^)操作符!",
|
"zh_CN": "记住插入(^)操作符!",
|
||||||
"zh_TW": "記住插入(^)運算符號!"
|
"zh_TW": "不要忘記插入(^) 符號!"
|
||||||
},
|
},
|
||||||
"startDialog": {
|
"startDialog": {
|
||||||
"en_US": {
|
"en_US": {
|
||||||
|
@ -171,11 +171,11 @@ exports.level = {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"## 相對引用",
|
"## 相對引用",
|
||||||
"",
|
"",
|
||||||
"如果要在Git中移動,透過指定commit的hash值的方式會變得比較麻煩。在現實中,你的終端機上面不會出現漂亮且具備視覺效果的commit tree,所以你不得不用`git log`來查詢hash值。",
|
"如果要在 Git 中移動,透過指定 commit 的 hash 值的方式會變得比較麻煩。在實際例子中,你的終端機上面不會出現漂亮且具備視覺效果的 commit tree,所以你不得不用 `git log` 來查詢 hash 值。",
|
||||||
"",
|
"",
|
||||||
"另外,hash值在真實的Git環境中也會很長。舉個例子,前一個關卡的介紹中的commit的hash值是`fed2da64c0efc5293610bdd892f82a58e8cbc5d8`。舌頭不要打結了...",
|
"另外,hash 值的長度在真實的 Git 環境中很長。舉個例子,前一個關卡的介紹中的 commit 的 hash 值是 `fed2da64c0efc5293610bdd892f82a58e8cbc5d8`。舌頭不要打結了...",
|
||||||
"",
|
"",
|
||||||
"好的一面是,Git對於處理hash很有一套。你只需要提供能夠唯一辨識出該commit的前幾個字元就可以了。所以,我可以只輸入`fed2`而不是上面的一長串字元。"
|
"幸運的是, Git 對於處理 hash 很有一套。你只需要提供能夠唯一辨識出該 commit 的前幾個字元就可以了。所以,我可以只輸入 `fed2` 而不是上面的一長串字元。"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -183,14 +183,14 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"我說過,透過hash來指定commit不是很方便,所以Git加入了相對引用。這個就很厲害了!",
|
"我說過,透過 hash 來指定 commit 不是很方便,所以 Git 加入了相對引用。這個就很厲害了!",
|
||||||
"",
|
"",
|
||||||
"使用相對引用,你可以從一個易於記憶的地方(比如說分支名稱`bugFix`或`HEAD`)開始工作。",
|
"使用相對引用,你可以從一個易於記憶的地方(比如說分支名稱 `bugFix` 或 `HEAD`)開始工作。",
|
||||||
"",
|
"",
|
||||||
"相對引用非常好用,這裡我介紹兩個簡單的用法:",
|
"相對引用非常好用,這裡我介紹兩個簡單的用法:",
|
||||||
"",
|
"",
|
||||||
"* 使用`^`向上移動1個commit",
|
"* 使用 `^` 向上移動一個 commit",
|
||||||
"* 使用`~<num>`向上移動多個commit"
|
"* 使用 `~<num>` 向上移動多個 commit"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -198,16 +198,16 @@ exports.level = {
|
||||||
"type": "GitDemonstrationView",
|
"type": "GitDemonstrationView",
|
||||||
"options": {
|
"options": {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"首先看看插入(^)這一個運算符號。把這個運算符號寫在某一個參考後面,就表示你叫Git去找到該參考所指向的commit的parent commit。",
|
"首先看看插入(^)這一個符號。把這個符號接在某一個 reference 後面,就表示你告訴 Git 去找到該 reference 所指向的 commit 的 parent commit。",
|
||||||
"",
|
"",
|
||||||
"所以`master^`相當於\"`master`的parent commit\"。",
|
"所以 `master^` 相當於 \"`master` 的 parent commit\"。",
|
||||||
"",
|
"",
|
||||||
"`master^^`是`master`的grandparent commit(往前推兩代)",
|
" `master^^` 是 `master` 的 grandparent commit(往前推兩代)",
|
||||||
"",
|
"",
|
||||||
"切換到master的parent commit"
|
"切換到 master的 parent commit"
|
||||||
],
|
],
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"看吧!完成了。這種方式比輸入代表commit的hash值簡單多了!"
|
"看吧!完成了。這種方式比輸入代表 commit 的 hash 值簡單多了!"
|
||||||
],
|
],
|
||||||
"command": "git checkout master^",
|
"command": "git checkout master^",
|
||||||
"beforeCommand": "git commit"
|
"beforeCommand": "git commit"
|
||||||
|
@ -217,10 +217,10 @@ exports.level = {
|
||||||
"type": "GitDemonstrationView",
|
"type": "GitDemonstrationView",
|
||||||
"options": {
|
"options": {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"你也可以把`HEAD`當作相對引用。以下指令使用`HEAD`在commit tree中向上移動數次。"
|
"你也可以把 `HEAD` 當作相對引用。以下指令使用 `HEAD` 在 commit tree 中向上移動數次。"
|
||||||
],
|
],
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"簡單吧!我們可以一直使用`HEAD^`向上移動。"
|
"簡單吧!我們可以一直使用 `HEAD^` 向上移動。"
|
||||||
],
|
],
|
||||||
"command": "git checkout C3; git checkout HEAD^; git checkout HEAD^; git checkout HEAD^",
|
"command": "git checkout C3; git checkout HEAD^; git checkout HEAD^; git checkout HEAD^",
|
||||||
"beforeCommand": "git commit; git commit"
|
"beforeCommand": "git commit; git commit"
|
||||||
|
@ -230,9 +230,9 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"要完成這一關,切換到`bugFix`的parent commit。這會分離出`HEAD`.",
|
"要完成這一關,切換到 `bugFix` 的 parent commit。這會分離出 `HEAD`。",
|
||||||
"",
|
"",
|
||||||
"如果你願意的話,透過指定hash值也可以過關,但是還是試試看相對引用吧!"
|
"如果你願意的話,透過直接指定 hash 值的方式也可以過關,但是還是試試看相對引用吧!"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@ exports.level = {
|
||||||
"hint": {
|
"hint": {
|
||||||
"en_US": "You'll need to use at least one direct reference (hash) to complete this level",
|
"en_US": "You'll need to use at least one direct reference (hash) to complete this level",
|
||||||
"zh_CN": "这一关至少要用到一次直接引用(hash)",
|
"zh_CN": "这一关至少要用到一次直接引用(hash)",
|
||||||
"zh_TW": "這一關至少要用到一次直接參考(hash)"
|
"zh_TW": "這一關至少要用到一次直接參考(hash)"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"en_US": "Relative Refs #2 (~)",
|
"en_US": "Relative Refs #2 (~)",
|
||||||
"zh_CN": "相对引用2(~)",
|
"zh_CN": "相对引用2(~)",
|
||||||
"zh_TW": "相對引用2(~)"
|
"zh_TW": "相對引用二(~)"
|
||||||
},
|
},
|
||||||
"startDialog": {
|
"startDialog": {
|
||||||
"en_US": {
|
"en_US": {
|
||||||
|
@ -144,10 +144,10 @@ exports.level = {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"### The \"~\" operator",
|
"### The \"~\" operator",
|
||||||
"",
|
"",
|
||||||
"假設需要在commit tree中向上移動多個commit。使用多個`^`會非常麻煩,所以Git也加入了波浪(~)的運算符號。",
|
"假設需要在 commit tree 中向上移動多個 commit。使用太多`^`會非常討人厭,所以 Git 也加入了波浪(~)符號。",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"波浪操作符號後面可以選擇一個數字(你也可以不選擇),該數字可以指定向上移動多少個commit。看個例子"
|
"波浪符號後面可以選擇一個數字(你也可以不選擇),該數字可以告訴 Git 我要向上移動多少個 commit 。舉個例子"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -155,10 +155,10 @@ exports.level = {
|
||||||
"type": "GitDemonstrationView",
|
"type": "GitDemonstrationView",
|
||||||
"options": {
|
"options": {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"使用`~`一次往上移動多個commit."
|
"使用 `~` 一次往上移動多個 commit。"
|
||||||
],
|
],
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"哇!太簡潔了--相對引用真的很好用!"
|
"哇!太簡潔了 -- 相對引用真的很好用!"
|
||||||
],
|
],
|
||||||
"command": "git checkout HEAD~4",
|
"command": "git checkout HEAD~4",
|
||||||
"beforeCommand": "git commit; git commit; git commit"
|
"beforeCommand": "git commit; git commit; git commit"
|
||||||
|
@ -170,13 +170,13 @@ exports.level = {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"### Branch forcing",
|
"### Branch forcing",
|
||||||
"",
|
"",
|
||||||
"你現在是相對引用的高手了,現在*用*他來實際做點事情。",
|
"你現在是相對引用的高手了,現在 *用* 他來實際做點事情。",
|
||||||
"",
|
"",
|
||||||
"我使用相對引用最多的就是移動分支。你可以使用`-f`選項直接讓分支指向另一個commit。舉個例子:",
|
"我使用相對引用最多的就是移動分支。你可以使用 `-f` 選項直接讓分支指向另一個 commit。舉個例子:",
|
||||||
"",
|
"",
|
||||||
"`git branch -f master HEAD~3`",
|
"`git branch -f master HEAD~3`",
|
||||||
"",
|
"",
|
||||||
"(強制)移動master指向HEAD往上的第三個parent commit。"
|
"(強制)移動 master 指向從 HEAD 往上數的第三個 parent commit。"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -184,7 +184,7 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"要完成這一關,移動`HEAD`,`master`和`bugFix`到目標所示的位置。"
|
"要完成這一關,移動 `HEAD`,`master` 和 `bugFix` 到目標所示的位置。"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,13 @@ exports.level = {
|
||||||
"fr_FR": "Annuler des changements avec Git",
|
"fr_FR": "Annuler des changements avec Git",
|
||||||
"ko": "Git에서 작업 되돌리기",
|
"ko": "Git에서 작업 되돌리기",
|
||||||
"zh_CN": "在Git中撤销更改",
|
"zh_CN": "在Git中撤销更改",
|
||||||
"zh_TW": "在Git中取消修改"
|
"zh_TW": "在 Git 中取消修改 "
|
||||||
},
|
},
|
||||||
"hint": {
|
"hint": {
|
||||||
"en_US": "Notice that revert and reset take different arguments.",
|
"en_US": "Notice that revert and reset take different arguments.",
|
||||||
"fr_FR": "",
|
"fr_FR": "",
|
||||||
"zh_CN": "注意revert和reset使用不同的参数。",
|
"zh_CN": "注意revert和reset使用不同的参数。",
|
||||||
"zh_TW": "注意revert和reset使用不同的參數。",
|
"zh_TW": "注意 revert 和 reset 使用不同的參數。",
|
||||||
"ko": "",
|
"ko": "",
|
||||||
"ja": ""
|
"ja": ""
|
||||||
},
|
},
|
||||||
|
@ -293,13 +293,13 @@ exports.level = {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"## Git Reset",
|
"## Git Reset",
|
||||||
"",
|
"",
|
||||||
"`git reset`把分支的參考點退回到上一個commit來取消修改。你可以認為這是在\"重寫歷史\"。`git reset`往回移動分支,原來的分支所指向的commit好像從來沒有存在過一樣。",
|
"`git reset` 把分支的參考點退回到上一個 commit 來取消修改。你可以認為這是在\"重寫歷史\"。`git reset` 往回移動分支,原來的分支所指向的commit好像從來沒有存在過一樣。",
|
||||||
"",
|
"",
|
||||||
"讓我們來看看要怎麼操作:"
|
"讓我們來看看要怎麼操作:"
|
||||||
],
|
],
|
||||||
"command": "git reset HEAD~1",
|
"command": "git reset HEAD~1",
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"太好了!Git把master分支簡單地移回到`C1`;現在在我們的local端已經退回到沒有commit過`C2`的狀態了。"
|
"太好了! Git 把 master 分支簡單地移回到 `C1`;現在在我們的 local端 已經退回到沒有 commit 過 `C2` 的狀態了。"
|
||||||
],
|
],
|
||||||
"beforeCommand": "git commit"
|
"beforeCommand": "git commit"
|
||||||
}
|
}
|
||||||
|
@ -312,11 +312,11 @@ exports.level = {
|
||||||
"",
|
"",
|
||||||
"雖然在你的local分支中使用`git reset`很方便,但是這種「改寫歷史」的方法對別人的遠端分支是無效的哦!",
|
"雖然在你的local分支中使用`git reset`很方便,但是這種「改寫歷史」的方法對別人的遠端分支是無效的哦!",
|
||||||
"",
|
"",
|
||||||
"為了取消修改並且把這個狀態*分享*給別人,我們需要使用`git revert`。舉個例子"
|
"為了取消修改並且把這個狀態*分享*給別人,我們需要使用 `git revert`。舉個例子"
|
||||||
],
|
],
|
||||||
"command": "git revert HEAD",
|
"command": "git revert HEAD",
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"很奇怪吧!在我們要取消的commit後面居然多了一個新的commit!這是因為新的commit`C2'`引入了*修改*——用來表示我們取消 `C2` 這個commit的修改。",
|
"很奇怪吧!在我們要取消的 commit 後面居然多了一個新的 commit!這是因為新的 commit `C2'` 引入了*修改*——用來表示我們取消 `C2` 這個 commit 的修改。",
|
||||||
"",
|
"",
|
||||||
"借助 revert,現在可以把你的修改分享給別人啦。"
|
"借助 revert,現在可以把你的修改分享給別人啦。"
|
||||||
],
|
],
|
||||||
|
@ -327,7 +327,7 @@ exports.level = {
|
||||||
"type": "ModalAlert",
|
"type": "ModalAlert",
|
||||||
"options": {
|
"options": {
|
||||||
"markdowns": [
|
"markdowns": [
|
||||||
"要完成這一關,分別取消`local`分支和`pushed`分支上的最近一次提交。",
|
"要完成這一關,分別取消 `local` 分支和 `pushed` 分支上的最近一次提交。",
|
||||||
"",
|
"",
|
||||||
"記住 `pushed` 是一個遠端分支,`local` 是一個本地分支 —— 有了這麼明顯的提示應該知道要用哪種方法了吧?"
|
"記住 `pushed` 是一個遠端分支,`local` 是一個本地分支 —— 有了這麼明顯的提示應該知道要用哪種方法了吧?"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue