Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/07-git-tools/sections/rewriting-history.asc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
35 changes: 18 additions & 17 deletions book/A-git-in-other-environments/sections/visualstudiocode.asc
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion status.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down