Skip to content

Commit 62f8c46

Browse files
authored
Merge pull request #693 from sivaraam/master
Few changes to the "Distributed Workflow" chapter
2 parents dc8c319 + fab44f7 commit 62f8c46

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Are all the patches peer-reviewed and approved?
2020
Are you involved in that process?
2121
Is a lieutenant system in place, and do you have to submit your work to them first?
2222

23-
The next issue is your commit access.
23+
The next variable is your commit access.
2424
The workflow required in order to contribute to a project is much different if you have write access to the project than if you don't.
2525
If you don't have write access, how does the project prefer to accept contributed work?
2626
Does it even have a policy?
@@ -61,7 +61,7 @@ The Git project requires that the more detailed explanation include your motivat
6161
It's also a good idea to use the imperative present tense in these messages.
6262
In other words, use commands.
6363
Instead of ``I added tests for'' or ``Adding tests for,'' use ``Add tests for.''
64-
Here is a template originally written by Tim Pope:
64+
Here is a http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[template originally written by Tim Pope]:
6565

6666
[source,text]
6767
----
@@ -87,7 +87,7 @@ Further paragraphs come after blank lines.
8787
If all your commit messages look like this, things will be a lot easier for you and the developers you work with.
8888
The Git project has well-formatted commit messages – try running `git log --no-merges` there to see what a nicely formatted project-commit history looks like.
8989

90-
In the following examples, and throughout most of this book, for the sake of brevity this book doesn't have nicely-formatted messages like this; instead, we use the `-m` option to `git commit`.
90+
For the sake of brevity, the following examples, and most examples in other parts of this book, don't have nicely-formatted messages like this; instead, we use the `-m` option to `git commit`.
9191
Do as we say, not as we do.
9292

9393
[[_private_team]]
@@ -177,7 +177,7 @@ John has a reference to the changes Jessica pushed up, but he has to merge them
177177
[source,console]
178178
----
179179
$ git merge origin/master
180-
Merge made by recursive.
180+
Merge made by the 'recursive' strategy.
181181
TODO | 1 +
182182
1 files changed, 1 insertions(+), 0 deletions(-)
183183
----
@@ -276,7 +276,7 @@ Now Jessica merges in John's work (`origin/master`):
276276
----
277277
$ git merge origin/master
278278
Auto-merging lib/simplegit.rb
279-
Merge made by recursive.
279+
Merge made by the 'recursive' strategy.
280280
lib/simplegit.rb | 2 +-
281281
1 files changed, 1 insertions(+), 1 deletions(-)
282282
----
@@ -394,7 +394,7 @@ Jessica can now merge this into the work she did with `git merge`:
394394
----
395395
$ git merge origin/featureBee
396396
Auto-merging lib/simplegit.rb
397-
Merge made by recursive.
397+
Merge made by the 'recursive' strategy.
398398
lib/simplegit.rb | 4 ++++
399399
1 files changed, 4 insertions(+), 0 deletions(-)
400400
----
@@ -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/distributed-workflows.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ This is a variant of a multiple-repository workflow.
6666
It's generally used by huge projects with hundreds of collaborators; one famous example is the Linux kernel.
6767
Various integration managers are in charge of certain parts of the repository; they're called lieutenants.
6868
All the lieutenants have one integration manager known as the benevolent dictator.
69-
The benevolent dictator's repository serves as the reference repository from which all the collaborators need to pull.
69+
The benevolent dictator pushes from his directory to a reference repository from which all the collaborators need to pull.
7070
The process works like this (see <<wfdiag_c>>):
7171

7272
1. Regular developers work on their topic branch and rebase their work on top of `master`.
73-
The `master` branch is that of the dictator.
73+
The `master` branch is that of the reference directory to which the dictator pushes.
7474
2. Lieutenants merge the developers' topic branches into their `master` branch.
75-
3. The dictator merges the lieutenants' `master` branches into the dictator's `master` branch.
75+
3. The dictator merges the lieutenants' `master` branches into their `master` branch.
7676
4. The dictator pushes their `master` to the reference repository so the other developers can rebase on it.
7777

7878
[[wfdiag_c]]

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ Falling back to patching base and 3-way merge...
163163
No changes -- Patch already applied.
164164
----
165165

166-
In this case, this patch had already been applied.
167-
Without the `-3` option, it looks like a conflict.
166+
In this case, without the `-3` option the patch would have been considered as a conflict.
167+
Since the `-3` option was used the patch applied cleanly.
168168

169169
If you're applying a number of patches from an mbox, you can also run the `am` command in interactive mode, which stops at each patch it finds and asks if you want to apply it:
170170

@@ -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)