You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/05-distributed-git/sections/contributing.asc
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Are all the patches peer-reviewed and approved?
20
20
Are you involved in that process?
21
21
Is a lieutenant system in place, and do you have to submit your work to them first?
22
22
23
-
The next issue is your commit access.
23
+
The next variable is your commit access.
24
24
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.
25
25
If you don't have write access, how does the project prefer to accept contributed work?
26
26
Does it even have a policy?
@@ -61,7 +61,7 @@ The Git project requires that the more detailed explanation include your motivat
61
61
It's also a good idea to use the imperative present tense in these messages.
62
62
In other words, use commands.
63
63
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]:
65
65
66
66
[source,text]
67
67
----
@@ -87,7 +87,7 @@ Further paragraphs come after blank lines.
87
87
If all your commit messages look like this, things will be a lot easier for you and the developers you work with.
88
88
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.
89
89
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`.
91
91
Do as we say, not as we do.
92
92
93
93
[[_private_team]]
@@ -177,7 +177,7 @@ John has a reference to the changes Jessica pushed up, but he has to merge them
177
177
[source,console]
178
178
----
179
179
$ git merge origin/master
180
-
Merge made by recursive.
180
+
Merge made by the 'recursive' strategy.
181
181
TODO | 1 +
182
182
1 files changed, 1 insertions(+), 0 deletions(-)
183
183
----
@@ -276,7 +276,7 @@ Now Jessica merges in John's work (`origin/master`):
276
276
----
277
277
$ git merge origin/master
278
278
Auto-merging lib/simplegit.rb
279
-
Merge made by recursive.
279
+
Merge made by the 'recursive' strategy.
280
280
lib/simplegit.rb | 2 +-
281
281
1 files changed, 1 insertions(+), 1 deletions(-)
282
282
----
@@ -394,7 +394,7 @@ Jessica can now merge this into the work she did with `git merge`:
394
394
----
395
395
$ git merge origin/featureBee
396
396
Auto-merging lib/simplegit.rb
397
-
Merge made by recursive.
397
+
Merge made by the 'recursive' strategy.
398
398
lib/simplegit.rb | 4 ++++
399
399
1 files changed, 4 insertions(+), 0 deletions(-)
400
400
----
@@ -520,8 +520,8 @@ $ git remote add myfork (url)
520
520
521
521
Then you need to push your work up to it.
522
522
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 cherrypicked, 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:
Copy file name to clipboardExpand all lines: book/05-distributed-git/sections/maintaining.asc
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,8 +163,8 @@ Falling back to patching base and 3-way merge...
163
163
No changes -- Patch already applied.
164
164
----
165
165
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.
168
168
169
169
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:
170
170
@@ -197,7 +197,7 @@ $ git fetch jessica
197
197
$ git checkout -b rubyclient jessica/ruby-client
198
198
----
199
199
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.
201
201
202
202
This is most useful if you're working with a person consistently.
203
203
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:
215
215
$ git pull https://github.com/onetimeguy/project
216
216
From https://github.com/onetimeguy/project
217
217
* branch HEAD -> FETCH_HEAD
218
-
Merge made by recursive.
218
+
Merge made by the 'recursive' strategy.
219
219
----
220
220
221
221
[[_what_is_introduced]]
@@ -297,7 +297,7 @@ You have a number of choices, so we'll cover a few of them.
297
297
===== Merging Workflows
298
298
299
299
(((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.
301
301
In this scenario, you have a `master` branch that contains basically stable code.
302
302
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.
303
303
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.]
329
329
.After a project release.
330
330
image::images/merging-workflows-5.png[After a topic branch release.]
331
331
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.
335
335
336
336
===== Large-Merging Workflows
337
337
@@ -357,7 +357,7 @@ The Git project also has a `maint` branch that is forked off from the last relea
357
357
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.
358
358
359
359
[[_rebase_cherry_pick]]
360
-
===== Rebasing and CherryPicking Workflows
360
+
===== Rebasing and Cherry-Picking Workflows
361
361
362
362
(((workflows, rebasing and cherry-picking)))
363
363
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