mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 09:20:03 +02:00
update src/levels/intro/rebasing.js
This commit is contained in:
parent
f953ac7ecf
commit
4dd3581dbd
1 changed files with 18 additions and 18 deletions
|
@ -7,7 +7,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",
|
||||
|
@ -15,7 +15,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 分支進行提交"
|
||||
"zh_TW": "你要先在 bugFix 分支進行 commit"
|
||||
},
|
||||
"disabledMap": {
|
||||
"git revert": true
|
||||
|
@ -295,11 +295,11 @@ exports.level = {
|
|||
"markdowns": [
|
||||
"## Git Rebase",
|
||||
"",
|
||||
"*rebasing*是在分支之間合併工作的第二種方法。Rebasing就是取出一系列的提交記錄,\"複製\"它們,然後把在別的某個地方放下來。",
|
||||
"*rebasing*是在合併分支的第二種方法。Rebasing 就是取出一系列的 commit,\"複製\"它們,然後把它們接在別的地方。",
|
||||
"",
|
||||
"雖然聽上去難以理解,rebasing 的優勢是可以創造更線性的提交歷史。假如只允許使用rebasing,代碼庫的提交日誌/歷史會更好看。",
|
||||
"雖然聽起來難以理解,rebasing 的優點是可以建立更線性的 commit history。假如只允許使用 rebasing 的話,則我們的 repository 中的 commit log 或者是 commit history 會更加簡潔好看。",
|
||||
"",
|
||||
"讓我們親身體會下……"
|
||||
"讓我們親身體會一下……"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -307,19 +307,19 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"這裡,還是有兩個分支;注意當前分支是 bugFix(看那顆星)",
|
||||
"這裡,還是有兩個分支;注意目前我們所在的分支是 bugFix(看那顆星啦)",
|
||||
"",
|
||||
"我們想要把 bugfix 裡面的工作直接移到 master 分支上。使用這個方法,兩個分支的功能看起來像是按順序開發,實際上它們是平行開發的。",
|
||||
"我們想要把在 bugfix 所做的修改直接移到 master 分支上。使用 rebasing 的話,兩個分支看起來像是依序按順序進行修改,實際上它們的修改是平行進行的。",
|
||||
"",
|
||||
"用 `git rebase`實現此目標"
|
||||
"用 `git rebase` 實現此目標"
|
||||
],
|
||||
"command": "git rebase master",
|
||||
"afterMarkdowns": [
|
||||
"碉堡吧,現在 bugFix 分支上的工作在 master 的最前端,同時我們也得到了一個更線性的提交序列。",
|
||||
"很厲害吧!現在 bugFix 分支上的工作在 master 的最前端,同時我們也得到了一個更加線性的 commit sequence。",
|
||||
"",
|
||||
"注意,提交記錄 C3 仍然存在(陰影的那貨就是你了,還看什麼看),而我們已經將 C3 複製到了master。",
|
||||
"注意,本來的 commit C3 沒有消失(在圖上面呈現陰影),而我們\"複製\" C3,將它的副本 C3' 接在 master 的後面。",
|
||||
"",
|
||||
"現在唯一的問題是 master 分支還沒有更新……下面就來更新它吧"
|
||||
"現在唯一的問題是 master 分支還沒有更新……我們接下來就更新它吧"
|
||||
],
|
||||
"beforeCommand": "git commit; git checkout -b bugFix C1; git commit"
|
||||
}
|
||||
|
@ -328,11 +328,11 @@ exports.level = {
|
|||
"type": "GitDemonstrationView",
|
||||
"options": {
|
||||
"beforeMarkdowns": [
|
||||
"現在,切換到 `master` 分支。接下來就把它 rebase 到 `bugFix` 吧……"
|
||||
"現在,切換到 `master` 分支。接下來就把它 rebase 到 `bugFix` 上面吧……"
|
||||
],
|
||||
"command": "git rebase bugFix",
|
||||
"afterMarkdowns": [
|
||||
"完成!因為 `master` 是 `bugFix` 的下游,所以 git 只把 `master` 分支的記錄前移到 `bugFix` 上。"
|
||||
"完成!因為 `master` 是 `bugFix` 的 ancestor,所以 git 只是把 `master` 分支往前移動到 `bugFix` 上。"
|
||||
],
|
||||
"beforeCommand": "git commit; git checkout -b bugFix C1; git commit; git rebase master; git checkout master"
|
||||
}
|
||||
|
@ -341,12 +341,12 @@ exports.level = {
|
|||
"type": "ModalAlert",
|
||||
"options": {
|
||||
"markdowns": [
|
||||
"想完成此關,執行以下操作:",
|
||||
"想完成這一關,執行以下操作:",
|
||||
"",
|
||||
"* 新建`bugFix`分支",
|
||||
"* 提交一次",
|
||||
"* 切換回 master 分支再提交一次",
|
||||
"* 再次切換到 bugFix 分支,rebase 到 master 上",
|
||||
"* 建立 `bugFix` 分支",
|
||||
"* commit 一次",
|
||||
"* 切換回 master 分支再 commit 一次",
|
||||
"* 再次切換到 bugFix 分支,將 bugFix 分支 rebase 到 master 上",
|
||||
"",
|
||||
"祝你好運啦!"
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue