Skip to content

Commit 1b20e36

Browse files
committed
Sync 03-git-branching basic-branching-and-merging
1 parent f9e392e commit 1b20e36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

book/03-git-branching/sections/basic-branching-and-merging.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ image::images/basic-branching-3.png[iss53 分支随着工作的进展向前推
6363
但是,在你这么做之前,要留意你的工作目录和暂存区里那些还没有被提交的修改,它可能会和你即将检出的分支产生冲突从而阻止 Git 切换到该分支。
6464
最好的方法是,在你切换分支之前,保持好一个干净的状态。
6565
有一些方法可以绕过这个问题(即,保存进度(stashing) 和 修补提交(commit amending)),我们会在 <<_git_stashing>> 中看到关于这两个命令的介绍。
66-
现在,我们假设你已经把你的修改全部提交了,这时你可以切换回 master 分支了:
66+
现在,我们假设你已经把你的修改全部提交了,这时你可以切换回 `master` 分支了:
6767

6868
[source,console]
6969
----
@@ -91,7 +91,7 @@ $ git commit -a -m 'fixed the broken email address'
9191
.基于 `master` 分支的紧急问题分支 `hotfix branch`
9292
image::images/basic-branching-4.png[基于 `master` 分支的紧急问题分支(hotfix branch)。]
9393

94-
你可以运行你的测试,确保你的修改是正确的,然后将其合并回你的 master 分支来部署到线上。
94+
你可以运行你的测试,确保你的修改是正确的,然后将其合并回你的 `master` 分支来部署到线上。
9595
你可以使用 `git merge` 命令来达到上述目的:(((git commands, merge)))
9696

9797
[source,console]
@@ -146,7 +146,7 @@ image::images/basic-branching-6.png[继续在 `iss53` 分支上的工作。]
146146

147147
(((branches, merging)))(((merging)))
148148
假设你已经修正了 #53 问题,并且打算将你的工作合并入 `master` 分支。
149-
为此,你需要合并 `iss53` 分支,这和之前你合并 `hotfix` 分支所做的工作差不多。
149+
为此,你需要合并 `iss53` 分支到 `master` 分支,这和之前你合并 `hotfix` 分支所做的工作差不多。
150150
你只需要检出到你想合并入的分支,然后运行 `git merge` 命令:
151151

152152
[source,console]
@@ -155,7 +155,7 @@ $ git checkout master
155155
Switched to branch 'master'
156156
$ git merge iss53
157157
Merge made by the 'recursive' strategy.
158-
README | 1 +
158+
index.html | 1 +
159159
1 file changed, 1 insertion(+)
160160
----
161161

0 commit comments

Comments
 (0)