@@ -63,7 +63,7 @@ image::images/basic-branching-3.png[iss53 分支随着工作的进展向前推
63
63
但是,在你这么做之前,要留意你的工作目录和暂存区里那些还没有被提交的修改,它可能会和你即将检出的分支产生冲突从而阻止 Git 切换到该分支。
64
64
最好的方法是,在你切换分支之前,保持好一个干净的状态。
65
65
有一些方法可以绕过这个问题(即,保存进度(stashing) 和 修补提交(commit amending)),我们会在 <<_git_stashing>> 中看到关于这两个命令的介绍。
66
- 现在,我们假设你已经把你的修改全部提交了,这时你可以切换回 master 分支了:
66
+ 现在,我们假设你已经把你的修改全部提交了,这时你可以切换回 ` master` 分支了:
67
67
68
68
[source,console]
69
69
----
@@ -91,7 +91,7 @@ $ git commit -a -m 'fixed the broken email address'
91
91
.基于 `master` 分支的紧急问题分支 `hotfix branch`
92
92
image::images/basic-branching-4.png[基于 `master` 分支的紧急问题分支(hotfix branch)。]
93
93
94
- 你可以运行你的测试,确保你的修改是正确的,然后将其合并回你的 master 分支来部署到线上。
94
+ 你可以运行你的测试,确保你的修改是正确的,然后将其合并回你的 ` master` 分支来部署到线上。
95
95
你可以使用 `git merge` 命令来达到上述目的:(((git commands, merge)))
96
96
97
97
[source,console]
@@ -146,7 +146,7 @@ image::images/basic-branching-6.png[继续在 `iss53` 分支上的工作。]
146
146
147
147
(((branches, merging)))(((merging)))
148
148
假设你已经修正了 #53 问题,并且打算将你的工作合并入 `master` 分支。
149
- 为此,你需要合并 `iss53` 分支,这和之前你合并 `hotfix` 分支所做的工作差不多。
149
+ 为此,你需要合并 `iss53` 分支到 `master` 分支,这和之前你合并 `hotfix` 分支所做的工作差不多。
150
150
你只需要检出到你想合并入的分支,然后运行 `git merge` 命令:
151
151
152
152
[source,console]
@@ -155,7 +155,7 @@ $ git checkout master
155
155
Switched to branch 'master'
156
156
$ git merge iss53
157
157
Merge made by the 'recursive' strategy.
158
- README | 1 +
158
+ index.html | 1 +
159
159
1 file changed, 1 insertion(+)
160
160
----
161
161
0 commit comments