Skip to content

Commit 6ea9eb6

Browse files
author
Kaartic Sivaraam
committed
Added a few changes to two sections of Chapter 5
* changed "cherry pick" to "cherry-pick" for consistency * monospaced a few git commands * monospaced a few branch names * added "git request-pull" command to a code example * added a word that would probably improve a sentence * changed a git output to be consistent with that shown git * changed a sentence to be more readable
1 parent 2966364 commit 6ea9eb6

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

book/05-distributed-git/sections/contributing.asc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ $ git remote add myfork (url)
520520

521521
Then you need to push your work up to it.
522522
It's easiest to push the topic branch you're working on up to your repository, rather than merging into your master branch and pushing that up.
523-
The reason is that if the work isn't accepted or is cherry picked, you don't have to rewind your master branch.
524-
If the maintainers merge, rebase, or cherry-pick your work, you'll eventually get it back via pulling from their repository anyhow:
523+
The reason is that if the work isn't accepted or is cherry-picked, you don't have to rewind your master branch.
524+
If the maintainers `merge`, `rebase`, or `cherry-pick` your work, you'll eventually get it back via pulling from their repository anyhow:
525525

526526
[source,console]
527527
----
@@ -566,6 +566,7 @@ $ git checkout -b featureB origin/master
566566
# (work)
567567
$ git commit
568568
$ git push myfork featureB
569+
$ git request-pull origin/master myfork
569570
# (email maintainer)
570571
$ git fetch origin
571572
----

book/05-distributed-git/sections/maintaining.asc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ $ git fetch jessica
197197
$ git checkout -b rubyclient jessica/ruby-client
198198
----
199199

200-
If she emails you again later with another branch containing another great feature, you can fetch and check out because you already have the remote setup.
200+
If she emails you again later with another branch containing another great feature, you could directly `fetch` and `checkout` because you already have the remote setup.
201201

202202
This is most useful if you're working with a person consistently.
203203
If someone only has a single patch to contribute once in a while, then accepting it over email may be less time consuming than requiring everyone to run their own server and having to continually add and remove remotes to get a few patches.
@@ -215,7 +215,7 @@ This does a one-time pull and doesn't save the URL as a remote reference:
215215
$ git pull https://github.com/onetimeguy/project
216216
From https://github.com/onetimeguy/project
217217
* branch HEAD -> FETCH_HEAD
218-
Merge made by recursive.
218+
Merge made by the 'recursive' strategy.
219219
----
220220

221221
[[_what_is_introduced]]
@@ -297,7 +297,7 @@ You have a number of choices, so we'll cover a few of them.
297297
===== Merging Workflows
298298

299299
(((workflows, merging)))
300-
One simple workflow merges your work into your `master` branch.
300+
One simple workflow is to merge the work into your `master` branch.
301301
In this scenario, you have a `master` branch that contains basically stable code.
302302
When you have work in a topic branch that you've done or that someone has contributed and you've verified, you merge it into your master branch, delete the topic branch, and then continue the process.
303303
If we have a repository with work in two branches named `ruby_client` and `php_client` that looks like <<merwf_a>> and merge `ruby_client` first and then `php_client` next, then your history will end up looking like <<merwf_b>>.
@@ -329,9 +329,9 @@ image::images/merging-workflows-4.png[After a topic branch merge.]
329329
.After a project release.
330330
image::images/merging-workflows-5.png[After a topic branch release.]
331331

332-
This way, when people clone your project's repository, they can either check out master to build the latest stable version and keep up to date on that easily, or they can check out develop, which is the more cutting-edge stuff.
333-
You can also continue this concept, having an integrate branch where all the work is merged together.
334-
Then, when the codebase on that branch is stable and passes tests, you merge it into a develop branch; and when that has proven itself stable for a while, you fast-forward your master branch.
332+
This way, when people clone your project's repository, they can either check out `master` to build the latest stable version and keep up to date on that easily, or they can check out `develop`, which is the more cutting-edge stuff.
333+
You can also extend this concept by having an `integrate` branch where all the work is merged together.
334+
Then, when the codebase on that branch is stable and passes tests, you merge it into a `develop` branch; and when that has proven itself stable for a while, you fast-forward your `master` branch.
335335

336336
===== Large-Merging Workflows
337337

@@ -357,7 +357,7 @@ The Git project also has a `maint` branch that is forked off from the last relea
357357
Thus, when you clone the Git repository, you have four branches that you can check out to evaluate the project in different stages of development, depending on how cutting edge you want to be or how you want to contribute; and the maintainer has a structured workflow to help them vet new contributions.
358358

359359
[[_rebase_cherry_pick]]
360-
===== Rebasing and Cherry Picking Workflows
360+
===== Rebasing and Cherry-Picking Workflows
361361

362362
(((workflows, rebasing and cherry-picking)))
363363
Other maintainers prefer to rebase or cherry-pick contributed work on top of their master branch, rather than merging it in, to keep a mostly linear history.

0 commit comments

Comments
 (0)