mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-09-01 08:17:16 +02:00
update some translations
This commit is contained in:
parent
1a53e51610
commit
1d2c6a8d82
8 changed files with 124 additions and 70 deletions
|
@ -8,7 +8,7 @@ exports.level = {
|
|||
"ko": "Git에서 브랜치 쓰기",
|
||||
"fr_FR": "Gérer les branches avec Git",
|
||||
"zh_CN": "建立Git分支",
|
||||
"zh_TW": "建立 Git 分支"
|
||||
"zh_TW": "建立 git branch"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "Make a new branch with \"git branch [name]\" and check it out with \"git checkout [name]\"",
|
||||
|
@ -16,7 +16,7 @@ exports.level = {
|
|||
"ja": "ブランチの作成(\"git branch [ブランチ名]\")と、チェックアウト(\"git checkout [ブランチ名]\")",
|
||||
"fr_FR": "Faites une nouvelle branche avec \"git branch [nom]\" positionnez-vous dans celle-ci avec \"git checkout [nom]\"",
|
||||
"zh_CN": "用 'git branch [分支名]' 来创建分支,用 'git checkout [分支名]' 切换到分支",
|
||||
"zh_TW": "用 'git branch [分支名稱]' 來建立分支,用 'git checkout [分支名稱]' 切換到該分支",
|
||||
"zh_TW": "用 'git branch [ branch 名稱]' 來建立 branch,用 'git checkout [ branch 名稱]' 切換到該 branch",
|
||||
"ko": "\"git branch [브랜치명]\"으로 새 브랜치를 만들고, \"git checkout [브랜치명]\"로 그 브랜치로 이동하세요"
|
||||
},
|
||||
"disabledMap": {
|
||||
|
@ -414,17 +414,17 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"## Git Branches",
|
||||
"## git 的 branch",
|
||||
"",
|
||||
" Git 的分支非常不占空間。它們只是一個指向某個 commit 的 reference —— 就這麼簡單。所以許多 Git 的愛好者會建議:",
|
||||
" git 的 branch 非常不占空間。它們只是一個指向某個 commit 的 reference,就這麼簡單。所以許多 git 的愛好者會建議:",
|
||||
"",
|
||||
"```",
|
||||
"早點建立分支!經常建立分支!",
|
||||
"早點建立 branch!經常建立 branch!",
|
||||
"```",
|
||||
"",
|
||||
"因為建立分支不怎麼會佔用到硬碟空間或者是記憶體,所以你可以把你目前的工作分成好幾個分支,這比只用一個分支要來的好。",
|
||||
"因為建立 branch 不怎麼會佔用到硬碟空間或者是記憶體,所以你可以把你目前的工作分成好幾個 branch,這比只用一個 branch 要來的好。",
|
||||
"",
|
||||
"同時使用分支和 commit 時,我們待會可以看到兩者如何配合。現在,只要記住使用分支其實就是在說:「我想要包含這一次的 commit 以及它的所有 parent commits。」"
|
||||
"同時使用 branch 和 commit 時,我們待會可以看到兩者如何配合。現在,只要記住使用 branch 其實就是在說:「我想要包含這一次的 commit 以及它的所有 parent 的 commit。」"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -432,13 +432,13 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"舉一個例子來看看分支到底是什麼。",
|
||||
"舉一個例子來看看 branch 到底是什麼。",
|
||||
"",
|
||||
"這裡,我們建立一個名稱為 `newImage` 的新分支。"
|
||||
"這裡,我們建立一個名稱為 `newImage` 的新的 branch。"
|
||||
],
|
||||
"command": "git branch newImage",
|
||||
"afterMarkdowns": [
|
||||
"看,這就是建立分支所需的操作啦! `newImage` 分支現在指向提交記錄 `C1`。"
|
||||
"看吧!這就是建立 branch 所需的操作啦! `newImage` branch 現在指向 commit `C1`。"
|
||||
],
|
||||
"beforeCommand": ""
|
||||
}
|
||||
|
@ -447,11 +447,11 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"現在讓我們這個新分支做一些操作。點擊下面的按鈕。"
|
||||
"現在讓我們這個新的 branch 做一些操作。點擊下面的按鈕。"
|
||||
],
|
||||
"command": "git commit",
|
||||
"afterMarkdowns": [
|
||||
"太奇怪了啦! `master` 分支前進了,但 `newImage` 分支沒有前進!這是因為我們沒有「在」這個新分支上,這也是為什麼星號(*)會在 `master` 上。"
|
||||
"太奇怪了啦! `master` branch 前進了,但 `newImage` branch 沒有前進!這是因為我們沒有「在」這個新的 branch 上,這也是為什麼星號(*)會在 `master` 上。"
|
||||
],
|
||||
"beforeCommand": "git branch newImage"
|
||||
}
|
||||
|
@ -460,17 +460,17 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"使用如下命令告訴 git 我們想要切換到新的分支",
|
||||
"使用如下指令告訴 git 我們想要切換到新的 branch",
|
||||
"",
|
||||
"```",
|
||||
"git checkout [name]",
|
||||
"```",
|
||||
"",
|
||||
"這可以讓我們在 commit 之前切換到新的分支。"
|
||||
"這可以讓我們在 commit 之前切換到新的 branch。"
|
||||
],
|
||||
"command": "git checkout newImage; git commit",
|
||||
"afterMarkdowns": [
|
||||
"太好了!新的分支已經記錄了我們的修改。"
|
||||
"太好了!新的 branch 已經記錄了我們的修改。"
|
||||
],
|
||||
"beforeCommand": "git branch newImage"
|
||||
}
|
||||
|
@ -479,8 +479,8 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"好啦,你已經準備好使用分支了。當目前的視窗關閉後,",
|
||||
"建立一個叫 `bugFix` 的新分支,然後切換過去。"
|
||||
"好啦,你已經準備好使用 branch 了。當目前的視窗關閉後,",
|
||||
"建立一個叫 `bugFix` 的新的 branch,然後切換過去。"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ exports.level = {
|
|||
"ja": "Gitのコミット",
|
||||
'ko': 'Git 커밋 소개',
|
||||
'zh_CN': 'Git Commits简介',
|
||||
'zh_TW': 'Git Commit 簡介'
|
||||
'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\"}}",
|
||||
"solutionCommand": "git commit;git commit",
|
||||
|
@ -294,12 +294,12 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"## Git Commits",
|
||||
"一個 commit 在 git repository 中會記錄目錄下所有文件的快照。感覺像是大量的複製和貼上,但 git 的速度更快!",
|
||||
"## git commit",
|
||||
"一個 commit 在 git repo 中會記錄目錄下所有文件的快照。感覺像是大量的複製和貼上,但 git 的速度更快!",
|
||||
"",
|
||||
"Git 希望 commit 儘可能地不占空間,所以每次進行 commit 的時候,它不會單純地複製整個目錄。實際上它把每次 commit 視為從目前的版本到下一個版本的變化量,或者說一個 \"(delta)\"。",
|
||||
"git 希望 commit 儘可能地不占空間,所以每次進行 commit 的時候,它不會單純地複製整個目錄。實際上它把每次 commit 視為從目前的版本到下一個版本的變化量,或者說一個 \"(delta)\"。",
|
||||
"",
|
||||
" Git 會保存 commit 的歷史紀錄,所以,絕大部分的 commit 的上面都會有 ancestor commits,在我們的圖形表示中,箭頭方向表示從 parent commit 到所對應的 child commit,保存這樣子的一個歷史紀錄是非常有用的。",
|
||||
"git 會保存 commit 的歷史紀錄,所以,絕大部分的 commit 的上面都會有 parent commit,在我們的圖形表示中,箭頭方向表示從 parent commit 到所對應的 child commit,保存這樣子的一個歷史紀錄是非常有用的。",
|
||||
"",
|
||||
"要學的東西有很多,但現在你可以把 commit 當作是當下的 project 的快照。commit 不占空間且可以快速切換!"
|
||||
]
|
||||
|
@ -309,7 +309,7 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"在實例中學習 commit。右邊是一個(小)git repository。當前有兩個 commit —— initial commit `C0` 以及 `C1` 這一個 commit 來表示之後可能的一些修改。",
|
||||
"在實例中學習 commit。右邊是一個(小)git repository。當前有兩個 commit,一開始的 commit `C0` 以及 `C1` 這一個 commit 來表示之後可能的一些修改。",
|
||||
"",
|
||||
"點擊下面的按鈕生成新的 commit。"
|
||||
],
|
||||
|
|
|
@ -8,7 +8,7 @@ exports.level = {
|
|||
"ko": "Git에서 브랜치 합치기(Merge)",
|
||||
"ja": "ブランチとマージ",
|
||||
"zh_CN": "分支与合并",
|
||||
"zh_TW": "Git 中的 合併"
|
||||
"zh_TW": "git 中的 merge"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "Remember to commit in the order specified (bugFix before master)",
|
||||
|
@ -374,11 +374,11 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"## Branches and Merging",
|
||||
"## branch 以及 merge",
|
||||
"",
|
||||
"太好了! 我們已經知道怎麼使用 commit 和分支了。接下來要學的一招是如何合併兩個不同分支的工作。這讓我們可以建立一個新的分支,並且在上面開發新功能,然後合併回主分支。",
|
||||
"太好了! 我們已經知道怎麼使用 commit 和 branch 了。接下來要學的一招是如何合併(merge)兩個不同 branch 的工作。這讓我們可以建立一個新的 branch ,並且在上面開發新功能,然後合併回 master branch。",
|
||||
"",
|
||||
"`git merge` 是我們要學習合併的第一個方法。該合併會產生一個特殊的 commit,它包含兩個唯一 parent commit。一個 commit 如果有兩個 parent commit 的話,那就表示:「我想把這兩個 parent commit 本身及它們的 所有的 parent commit 都包含進來。」",
|
||||
"`git merge` 是我們要學習 merge 的第一個方法。該 merge 會產生一個特殊的 commit,它包含兩個唯一 parent commit。一個 commit 如果有兩個 parent commit 的話,那就表示:「我想把這兩個 parent commit 本身及它們的 所有的 parent commit 都包含進來。」",
|
||||
"",
|
||||
"有圖有真相,看看下面的圖就明白了。"
|
||||
]
|
||||
|
@ -388,17 +388,17 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"在這裡,我們有兩個分支:各自都有一個唯一的 commit。這意味著沒有一個分支包含我們對文件的所有修改。讓我們合併這兩個分支來解決這個問題。",
|
||||
"在這裡,我們有兩個 branch:各自都有一個唯一的 commit。這意味著沒有一個 branch 包含我們對文件的所有修改。讓我們 merge 這兩個 branch 來解決這個問題。",
|
||||
"",
|
||||
"我們要把 `bugFix` 合併到 `master` "
|
||||
"我們要 merge `bugFix` 到 `master` "
|
||||
],
|
||||
"command": "git merge bugFix",
|
||||
"afterMarkdowns": [
|
||||
"哇!看見了沒有?首先,`master` 現在指向一個 commit,這個 commit 有兩個 parent commit。假如從 `master` 開始沿著箭頭向上走,在到達起點的路上會經過所有的提交記錄。這說明了現在 `master` 紀錄了對文件的所有修改。",
|
||||
"哇!看見了沒有?首先,`master` 現在指向一個 commit,這個 commit 有兩個 parent commit。假如從 `master` 開始沿著箭頭向上走,在到達起點的路上會經過所有的 commit。這說明了現在 `master` 紀錄了對文件的所有修改。",
|
||||
"",
|
||||
"還有,看見各個 commit 的顏色變化了嗎?為了幫助學習,我混合了顏色。每個分支都有特定的顏色。每個 commit 的顏色都變成了含有此 commit 的所有分支的混合色。",
|
||||
"還有,看見各個 commit 的顏色變化了嗎?為了幫助學習,我混合了顏色。每個 branch 都有特定的顏色。每個 commit 的顏色都變成了含有此 commit 的所有 branch 的混合色。",
|
||||
"",
|
||||
"所以,`master` 分支的顏色被混入到所有的 commit,但 `bugFix` 沒有。接下來就改一下這裡吧。"
|
||||
"所以,`master` branch 的顏色被混入到所有的 commit,但 `bugFix` 沒有。接下來就改一下這裡吧。"
|
||||
],
|
||||
"beforeCommand": "git checkout -b bugFix; git commit; git checkout master; git commit"
|
||||
}
|
||||
|
@ -407,13 +407,13 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"讓我們把 `master` 分支合併到 `bugFix` 吧。"
|
||||
"讓我們 merge `master` branch 到 `bugFix` 吧。"
|
||||
],
|
||||
"command": "git checkout bugFix; git merge master",
|
||||
"afterMarkdowns": [
|
||||
"因為 `bugFix` 分支只是 `master` 分支的 ancestor,git 什麼都不用做,只是簡單地把 `bugfix` 分支移動到 `master` 指向的 commit。",
|
||||
"因為 `bugFix` branch只是 `master` branch 的 parent,git 什麼都不用做,只是簡單地把 `bugfix` branch 移動到 `master` 指向的 commit。",
|
||||
"",
|
||||
"現在所有的 commit 的顏色都是一樣的啦,這表示每一個分支都包含了所有文件的修改!太厲害了啦!"
|
||||
"現在所有的 commit 的顏色都是一樣的啦,這表示每一個 branch 都包含了所有文件的修改!太厲害了啦!"
|
||||
],
|
||||
"beforeCommand": "git checkout -b bugFix; git commit; git checkout master; git commit; git merge bugFix"
|
||||
}
|
||||
|
@ -424,12 +424,12 @@ exports.level = {
|
|||
"markdowns": [
|
||||
"想完成這一關,執行以下的操作:",
|
||||
"",
|
||||
"* 建立新的分支 `bugFix` ",
|
||||
"* 用 `git checkout bugFix` 切換到 `bugFix` 分支",
|
||||
"* 建立新的 branch,叫做 `bugFix` ",
|
||||
"* 用 `git checkout bugFix` 切換到 `bugFix` branch",
|
||||
"* commit 一次",
|
||||
"* 用 `git checkout` 切換回 `master` 分支 ",
|
||||
"* 用 `git checkout` 切換回 `master` branch",
|
||||
"* 再 commit 一次",
|
||||
"* 用 `git merge` 將 `bugFix` 合併到 `master`",
|
||||
"* 用 `git merge` 將 `bugFix` merge 到 `master`",
|
||||
"",
|
||||
"*記住,你可以用 \"help level\" 指令來重新顯示這個對話框!*"
|
||||
]
|
||||
|
|
|
@ -8,7 +8,7 @@ exports.level = {
|
|||
"fr_FR": "Introduction à rebase",
|
||||
"ko": "리베이스(rebase)의 기본",
|
||||
"zh_CN": "Rebase简介",
|
||||
"zh_TW": "Rebase 簡介"
|
||||
"zh_TW": "介紹 rebase"
|
||||
},
|
||||
"hint": {
|
||||
"en_US": "Make sure you commit from bugFix first",
|
||||
|
@ -17,7 +17,7 @@ exports.level = {
|
|||
"fr_FR": "Assurez-vous de bien faire votre en premier votre commit sur bugFix",
|
||||
"ko": "bugFix 브랜치에서 먼저 커밋하세요",
|
||||
"zh_CN": "确保你先在 bugFix 分支进行提交",
|
||||
"zh_TW": "你要先在 bugFix 分支進行 commit"
|
||||
"zh_TW": "你要先在 bugFix branch 進行 commit"
|
||||
},
|
||||
"disabledMap": {
|
||||
"git revert": true
|
||||
|
@ -362,13 +362,13 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"## Git Rebase",
|
||||
"## git rebase",
|
||||
"",
|
||||
"*rebasing*是在合併分支的第二種方法。Rebasing 就是取出一系列的 commit,\"複製\"它們,然後把它們接在別的地方。",
|
||||
"*rebasing* 是 merge branch 的第二種方法。rebasing 就是取出一連串的 commit,\"複製\"它們,然後把它們接在別的地方。",
|
||||
"",
|
||||
"雖然聽起來難以理解,rebasing 的優點是可以建立更線性的 commit history。假如只允許使用 rebasing 的話,則我們的 repository 中的 commit log 或者是 commit history 會更加簡潔好看。",
|
||||
"雖然聽起來難以理解,rebasing 的優點是可以建立更線性的 commit history。假如只允許使用 rebasing 的話,則我們的 repo 中的 commit log 或者是 commit history 會更加簡潔好看。",
|
||||
"",
|
||||
"讓我們親身體會一下……"
|
||||
"讓我們親身體會一下..."
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -376,19 +376,19 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"這裡,還是有兩個分支;注意目前我們所在的分支是 bugFix(看那顆星啦)",
|
||||
"這裡,還是有兩個 branch;注意目前我們所在的 branch 是 bugFix(看那顆星啦)",
|
||||
"",
|
||||
"我們想要把在 bugfix 所做的修改直接移到 master 分支上。使用 rebasing 的話,兩個分支看起來像是依序按順序進行修改,實際上它們的修改是平行進行的。",
|
||||
"我們想要把在 bugfix 所做的修改直接移到 master branch上。使用 rebasing 的話,兩個 branch 看起來像是依序按順序進行修改,實際上它們的修改是平行進行的。",
|
||||
"",
|
||||
"用 `git rebase` 實現此目標"
|
||||
"用 `git rebase` 來實現吧"
|
||||
],
|
||||
"command": "git rebase master",
|
||||
"afterMarkdowns": [
|
||||
"很厲害吧!現在 bugFix 分支上的工作在 master 的最前端,同時我們也得到了一個更加線性的 commit sequence。",
|
||||
"很厲害吧!現在 bugFix branch 上的工作在 master branch 的最前端,同時我們也得到了一個更加線性的 commit 順序。",
|
||||
"",
|
||||
"注意,本來的 commit C3 沒有消失(在圖上面呈現陰影),而我們\"複製\" C3,將它的副本 C3' 接在 master 的後面。",
|
||||
"注意,本來的 commit C3 沒有消失(在圖上面呈現陰影),而我們\"複製\" C3,將它的副本 C3' 接在 master branch 的後面。",
|
||||
"",
|
||||
"現在唯一的問題是 master 分支還沒有更新……我們接下來就更新它吧"
|
||||
"現在唯一的問題是 master branch 還沒有更新...我們接下來就更新它吧!"
|
||||
],
|
||||
"beforeCommand": "git commit; git checkout -b bugFix C1; git commit"
|
||||
}
|
||||
|
@ -397,11 +397,11 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"現在,切換到 `master` 分支。接下來就把它 rebase 到 `bugFix` 上面吧……"
|
||||
"現在,切換到 `master` branch。接下來就把它 rebase 到 `bugFix` 上面吧..."
|
||||
],
|
||||
"command": "git rebase bugFix",
|
||||
"afterMarkdowns": [
|
||||
"完成!因為 `master` 是 `bugFix` 的 ancestor,所以 git 只是把 `master` 分支往前移動到 `bugFix` 上。"
|
||||
"完成!因為 `master` branch 是 `bugFix` 的 parent,所以 git 只是把 `master` branch 往前移動到 `bugFix` 上。"
|
||||
],
|
||||
"beforeCommand": "git commit; git checkout -b bugFix C1; git commit; git rebase master; git checkout master"
|
||||
}
|
||||
|
@ -412,10 +412,10 @@ exports.level = {
|
|||
"markdowns": [
|
||||
"想完成這一關,執行以下操作:",
|
||||
"",
|
||||
"* 建立 `bugFix` 分支",
|
||||
"* 建立 `bugFix` branch",
|
||||
"* commit 一次",
|
||||
"* 切換回 master 分支再 commit 一次",
|
||||
"* 再次切換到 bugFix 分支,將 bugFix 分支 rebase 到 master 上",
|
||||
"* 切換回 master branch 再 commit 一次",
|
||||
"* 再次切換到 bugFix branch,接著 rebase bugFix 這個 branch 到 master branch 上",
|
||||
"",
|
||||
"祝你好運啦!"
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue