git checkout to git switch (#630)

* checkout to switch (en)

* checkout to switch (es)

* checkout to switch (fr)

* checkout to switch (id)

* checkout to switch (it)

* checkout to switch (hi)

* checkout to switch (ko)

* checkout to switch (ms)

* checkout to switch (nl)

* checkout to switch (zh-cn)

* checkout to switch (zh-tw)

* checkout to switch (lesson)

* checkout to switch (quizz)
This commit is contained in:
booleans-oss
2022-03-10 05:45:04 +04:00
committed by GitHub
parent 503e0f541b
commit db5d16f769
28 changed files with 84 additions and 84 deletions

View File

@@ -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
```