From cc8bc648a3a89779059874e3ceb7cf14120eb19f Mon Sep 17 00:00:00 2001 From: ousugo Date: Fri, 10 Apr 2020 11:09:40 +0800 Subject: [PATCH 1/2] change two words --- book/07-git-tools/sections/rewriting-history.asc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/07-git-tools/sections/rewriting-history.asc b/book/07-git-tools/sections/rewriting-history.asc index 3a3be757..0503c25f 100644 --- a/book/07-git-tools/sections/rewriting-history.asc +++ b/book/07-git-tools/sections/rewriting-history.asc @@ -275,10 +275,10 @@ edit 310154e updated README formatting and added blame pick a5f4a0d added cat-file ---- -然后,当脚本将你进入到命令行时,重置那个提交,拿到被重置的修改,从中创建几次提交。 +然后,当脚本带你进入到命令行时,重置那个提交,拿到被重置的修改,从中创建几次提交。 当保存并退出编辑器时,Git 带你到列表中第一个提交的父提交,应用第一个提交(`f7f3f6d`), 应用第二个提交(`310154e`),然后让你进入命令行。 -那里,可以通过 `git reset HEAD^` 做一次针对那个提交的混合重置,实际上将会撤消那次提交并将修改的文件未暂存。 +那里,可以通过 `git reset HEAD^` 做一次针对那个提交的混合重置,实际上将会撤消那次提交并将修改的文件取消暂存。 现在可以暂存并提交文件直到有几个提交,然后当完成时运行 `git rebase --continue`: [source,console] From db2198c8a5f2be78d195fec6f3ba57ab8f7dcb32 Mon Sep 17 00:00:00 2001 From: ousugo Date: Fri, 10 Apr 2020 15:28:20 +0800 Subject: [PATCH 2/2] translate visualstudiocode.asc --- .../sections/visualstudiocode.asc | 35 ++++++++++--------- status.json | 3 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/book/A-git-in-other-environments/sections/visualstudiocode.asc b/book/A-git-in-other-environments/sections/visualstudiocode.asc index 31e8de20..99e8ac6e 100644 --- a/book/A-git-in-other-environments/sections/visualstudiocode.asc +++ b/book/A-git-in-other-environments/sections/visualstudiocode.asc @@ -1,21 +1,22 @@ -=== Git in Visual Studio Code +=== Visual Studio Code 中的 Git -Visual Studio Code has git support built in. -You will need to have git version 2.0.0 (or newer) installed. +(((Visual Studio Code))) +Visual Studio Code 自带对 Git 的支持。你需要已经安装好 2.0.0(及以上)版本的 Git。 -The main features are: +主要功能如下: -* See the diff of the file you are editing in the gutter. -* The Git Status Bar (lower left) shows the current branch, dirty indicators, incoming and outgoing commits. -* You can do the most common git operations from within the editor: -** Initialize a repository. -** Clone a repository. -** Create branches and tags. -** Stage and commit changes. -** Push/pull/sync with a remote branch. -** Resolve merge conflicts. -** View diffs. -* With a extension, you can also handle GitHub Pull Requests: - https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github[] +* 在行号槽显示你正在编辑的文件的改动情况。 +* Git 状态栏(位于左下角)会显示当前所在分支,编辑指示符以及未提交或者未拉取的提交的数量。 +* 你能够在编辑器内完成常用的 Git 操作: +** 初始化一个仓库。 +** 克隆一个仓库。 +** 新建分支和标签。 +** 暂存和提交修改。 +** 对一个远程分支进行推送/拉取/同步。 +** 解决合并冲突。 +** 查看比较。 +* 配合一个扩展,你也能够处理 GitHub 的拉取请求: + https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github -The official documentation can be found here: https://code.visualstudio.com/Docs/editor/versioncontrol[] +官方文档请访问: +https://code.visualstudio.com/Docs/editor/versioncontrol \ No newline at end of file diff --git a/status.json b/status.json index 9cdfe0ad..93ae4b97 100644 --- a/status.json +++ b/status.json @@ -113,7 +113,8 @@ "sections/guis.asc": 100, "sections/powershell.asc": 100, "sections/visualstudio.asc": 100, - "sections/zsh.asc": 100 + "sections/zsh.asc": 100, + "sections/visualstudiocode.asc": 100 }, "B-embedding-git": { "1-embedding-git.asc": 100,