diff --git a/1-getting-started-lessons/2-github-basics/translations/README.zh-cn.md b/1-getting-started-lessons/2-github-basics/translations/README.zh-cn.md index 698161a0..e217ffa0 100644 --- a/1-getting-started-lessons/2-github-basics/translations/README.zh-cn.md +++ b/1-getting-started-lessons/2-github-basics/translations/README.zh-cn.md @@ -203,10 +203,10 @@ git branch [分支名] ``` -1. **切换到工作分支**。使用 `git checkout` 来切换到指定分支并且更新工作目录中的文件: +1. **切换到工作分支**。使用 `git switch` 来切换到指定分支并且更新工作目录中的文件: ```bash - git checkout [分支名] + git switch [分支名] ``` 1. **干活**。现在你可以添加你的变更了,别忘了用下面的命令告诉 Git 你所做的工作: @@ -221,14 +221,14 @@ 1. **将你的工作合入 `main` 分支**。在完成工作后,你打算将你的工作和 `main` 分支上的合并。`main` 分支可能同时有了一些新的变更,所以要先用以下命令确保将其更新至最新版本: ```bash - git checkout main + git switch main git pull ``` 这时你想确认是否存在 _冲突(conflicts)_,即 Git 没法简单地将这些变化 _合入_ 你的分支的情况。为此运行下面的命令: ```bash - git checkout [分支名] + git switch [分支名] git merge main ``` diff --git a/quiz-app/src/assets/translations/zh_cn.json b/quiz-app/src/assets/translations/zh_cn.json index 9c3ad741..bcf40c08 100644 --- a/quiz-app/src/assets/translations/zh_cn.json +++ b/quiz-app/src/assets/translations/zh_cn.json @@ -209,11 +209,11 @@ "questionText": "你该如何切换到一个分支?", "answerOptions": [ { - "answerText": "git switch [branch-name]", + "answerText": "git checkout [branch-name]", "isCorrect": "false" }, { - "answerText": "git checkout [branch-name]", + "answerText": "git switch [branch-name]", "isCorrect": "true" }, {