Skip to content

Commit 5026c45

Browse files
authored
Merge pull request #704 from sivaraam/changes
A few changes to chapter 5
2 parents 11ebf57 + 9938743 commit 5026c45

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ $ 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.
523+
The reason is that if the work isn't accepted or is cherry-picked, you don't have to rewind your master branch. (`cherry-pick` is covered in more detail in <<_rebase_cherry_pick>>).
524524
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]

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ When you're thinking of integrating new work, it's generally a good idea to try
1212
This way, it's easy to tweak a patch individually and leave it if it's not working until you have time to come back to it.
1313
If you create a simple branch name based on the theme of the work you're going to try, such as `ruby_client` or something similarly descriptive, you can easily remember it if you have to abandon it for a while and come back later.
1414
The maintainer of the Git project tends to namespace these branches as well – such as `sc/ruby_client`, where `sc` is short for the person who contributed the work.
15-
As you'll remember, you can create the branch based off your master branch like this:
15+
As you'll remember, you can create the branch based off your `master` branch like this:
1616

1717
[source,console]
1818
----
@@ -26,7 +26,7 @@ Or, if you want to also switch to it immediately, you can use the `checkout -b`
2626
$ git checkout -b sc/ruby_client master
2727
----
2828

29-
Now you're ready to add your contributed work into this topic branch and determine if you want to merge it into your longer-term branches.
29+
Now you're ready to add the contributed work that you received into this topic branch and determine if you want to merge it into your longer-term branches.
3030

3131
[[_patches_from_email]]
3232
==== Applying Patches from Email
@@ -73,7 +73,7 @@ If the contributor is a Git user and was good enough to use the `format-patch` c
7373
If you can, encourage your contributors to use `format-patch` instead of `diff` to generate patches for you.
7474
You should only have to use `git apply` for legacy patches and things like that.
7575

76-
To apply a patch generated by `format-patch`, you use `git am`.
76+
To apply a patch generated by `format-patch`, you use `git am` (the command is named `am` as it is used to "apply a series of patches from a mailbox").
7777
Technically, `git am` is built to read an mbox file, which is a simple, plain-text format for storing one or more email messages in one text file.
7878
It looks something like this:
7979

@@ -346,7 +346,8 @@ If they're safe, they're merged into `next`, and that branch is pushed up so eve
346346
image::images/large-merges-1.png[Managing a complex series of parallel contributed topic branches.]
347347

348348
If the topics still need work, they're merged into `pu` instead.
349-
When it's determined that they're totally stable, the topics are re-merged into `master` and are then rebuilt from the topics that were in `next` but didn't yet graduate to `master`.
349+
When it's determined that they're totally stable, the topics are re-merged into `master`.
350+
The `next` and `pu` branches are then rebuilt from the `master`.
350351
This means `master` almost always moves forward, `next` is rebased occasionally, and `pu` is rebased even more often:
351352

352353
.Merging contributed topic branches into long-term integration branches.
@@ -355,6 +356,7 @@ image::images/large-merges-2.png[Merging contributed topic branches into long-te
355356
When a topic branch has finally been merged into `master`, it's removed from the repository.
356357
The Git project also has a `maint` branch that is forked off from the last release to provide backported patches in case a maintenance release is required.
357358
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.
359+
The Git project's workflow is specialized. To clearly understand this you could check out the https://github.com/git/git/blob/master/Documentaion/howto/maintain-git.txt[Git Maintainer's guide].
358360

359361
[[_rebase_cherry_pick]]
360362
===== Rebasing and Cherry-Picking Workflows

0 commit comments

Comments
 (0)