18
18
19
19
=== 设置与配置
20
20
21
- 有两个十分常用的命令:`config` 和 `help`。
22
- 从第一次调用 Git 到日常微调及阅读参考,它们一直陪伴着你。
21
+ 有两个十分常用的命令:`config` 和 `help`。从第一次调用 Git 到日常微调及阅读参考,它们一直陪伴着你。
23
22
24
23
==== git config
25
24
@@ -52,22 +51,25 @@ Git 做的很多工作都有一种默认方式。
52
51
|==============================
53
52
|编辑器 | 设置命令
54
53
|Atom |`git config --global core.editor "atom --wait"`
55
- |BBEdit (Mac , with command line tools) |`git config --global core.editor "bbedit -w"`
54
+ |BBEdit (macOS , with command line tools) |`git config --global core.editor "bbedit -w"`
56
55
|Emacs |`git config --global core.editor emacs`
57
56
|Gedit (Linux) |`git config --global core.editor "gedit --wait --new-window"`
58
- |Gvim (Windows 64-bit) |`git config --global core.editor "'C:/Program Files/Vim/vim72/gvim.exe' --nofork '%*'"` (Also see note below)
59
- |Kate (Linux) |`git config --global core.editor "kate"`
57
+ |Gvim (Windows 64-bit) |`git config --global core.editor "'C:\Program Files\Vim\vim72\gvim.exe' --nofork '%*'"` (Also see note below)
58
+ |Helix |`git config --global core.editor "hx"`
59
+ |Kate (Linux) |`git config --global core.editor "kate --block"`
60
60
|nano |`git config --global core.editor "nano -w"`
61
61
|Notepad (Windows 64-bit) |`git config core.editor notepad`
62
- |Notepad++ (Windows 64-bit) |`git config --global core.editor "'C:/ Program Files/ Notepad++/ notepad++.exe' -multiInst -notabbar -nosession -noPlugin"` (Also see note below)
62
+ |Notepad++ (Windows 64-bit) |`git config --global core.editor "'C:\ Program Files\ Notepad++\ notepad++.exe' -multiInst -notabbar -nosession -noPlugin"` (Also see note below)
63
63
|Scratch (Linux)|`git config --global core.editor "scratch-text-editor"`
64
64
|Sublime Text (macOS) |`git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl --new-window --wait"`
65
- |Sublime Text (Windows 64-bit) |`git config --global core.editor "'C:/ Program Files/ Sublime Text 3/ sublime_text.exe' -w"` (Also see note below)
66
- |TextEdit (macOS)|`git config --global --add core.editor "open -W -n "`
65
+ |Sublime Text (Windows 64-bit) |`git config --global core.editor "'C:\ Program Files\ Sublime Text 3\ sublime_text.exe' -w"` (Also see note below)
66
+ |TextEdit (macOS)|`git config --global core.editor "open --wait-apps --new -e "`
67
67
|Textmate |`git config --global core.editor "mate -w"`
68
- |Textpad (Windows 64-bit) |`git config --global core.editor "'C:/Program Files/TextPad 5/TextPad.exe' -m` (Also see note below)
69
- |Vim |`git config --global core.editor "vim"`
70
- |VS Code |`git config --global core.editor "code --wait"`
68
+ |Textpad (Windows 64-bit) |`git config --global core.editor "'C:\Program Files\TextPad 5\TextPad.exe' -m` (Also see note below)
69
+ |UltraEdit (Windows 64-bit) | `git config --global core.editor Uedit32`
70
+ |Vim |`git config --global core.editor "vim --nofork"`
71
+ |Visual Studio Code |`git config --global core.editor "code --wait"`
72
+ |VSCodium (Free/Libre Open Source Software Binaries of VSCode) | `git config --global core.editor "codium --wait"`
71
73
|WordPad |`git config --global core.editor '"C:\Program Files\Windows NT\Accessories\wordpad.exe"'"`
72
74
|Xi | `git config --global core.editor "xi --wait"`
73
75
|==============================
@@ -84,7 +86,6 @@ Git 做的很多工作都有一种默认方式。
84
86
85
87
我们在 <<ch01-getting-started#_git_help>> 一节中介绍了 `git help` 命令,同时在 <<ch04-git-on-the-server#_setting_up_server>> 一节中给你展示了如何使用它来查找更多关于 `git shell` 的信息。
86
88
87
-
88
89
=== 获取与创建项目
89
90
90
91
有几种方式获取一个 Git 仓库。
@@ -119,7 +120,6 @@ Git 做的很多工作都有一种默认方式。
119
120
120
121
虽然在本书的其他地方都有用到此命令,但是上面这些用法是特例,或者使用方式有点特别。
121
122
122
-
123
123
=== 快照基础
124
124
125
125
对于基本的暂存内容及提交到你的历史记录中的工作流,只有少数基本的命令。
@@ -312,7 +312,6 @@ Git 有几个实现大部的分支及合并功能的实用命令。
312
312
313
313
我也在 <<ch07-git-tools#_signing>> 一节中介绍了如何使用 `-s` 标志创建一个 GPG 签名的标签,然后使用 `-v` 选项来验证。
314
314
315
-
316
315
=== 项目分享与更新
317
316
318
317
在 Git 中没有多少访问网络的命令,几乎所以的命令都是在操作本地的数据库。
@@ -414,7 +413,6 @@ Git 有几个实现大部的分支及合并功能的实用命令。
414
413
415
414
我们在 <<ch05-distributed-git#_build_number>> 及 <<ch05-distributed-git#_preparing_release>> 章节中使用 `git describe` 命令来获得一个字符串来命名我们发布的文件。
416
415
417
-
418
416
=== 调试
419
417
420
418
Git 有一些命令可以用来帮你调试你代码中的问题。
@@ -496,14 +494,14 @@ Git 中的一些命令是以引入的变更即提交这样的概念为中心的
496
494
497
495
==== git format-patch
498
496
499
-
500
497
`git format-patch` 命令用来以 mbox 的格式来生成一系列的补丁以便你可以发送到一个邮件列表中。
501
498
502
499
我们在 <<ch05-distributed-git#_project_over_email>> 一节中研究了一个使用 `git format-patch` 工具为一个项目做贡献的示例。
503
500
504
-
505
501
==== git imap-send
502
+
506
503
`git imap-send` 将一个由 `git format-patch` 生成的邮箱上传至 IMAP 草稿文件夹。
504
+
507
505
我们在 <<ch05-distributed-git#_project_over_email>> 一节中见过一个通过使用 `git imap-send` 工具向一个项目发送补丁进行贡献的例子。
508
506
509
507
==== git send-email
@@ -549,7 +547,6 @@ Git 有一些可以与其他的版本控制系统集成的命令。
549
547
550
548
==== git fsck
551
549
552
-
553
550
`git fsck` 命令用来检查内部数据库的问题或者不一致性。
554
551
555
552
我们只在 <<ch10-git-internals#_data_recovery>> 这一节中快速使用了一次此命令来搜索所有的悬空对象(dangling object)。
0 commit comments