Skip to content

Commit 090a875

Browse files
authored
Merge pull request #1343 from Morganov/fix-formatting
Fix formatting
2 parents f23a9ba + 2d4e209 commit 090a875

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

book/03-git-branching/sections/rebasing.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Finally, you went back to your server branch and did a few more commits.
7373
image::images/interesting-rebase-1.png[A history with a topic branch off another topic branch.]
7474

7575
Suppose you decide that you want to merge your client-side changes into your mainline for a release, but you want to hold off on the server-side changes until it's tested further.
76-
You can take the changes on client that aren't on server (`C8` and `C9`) and replay them on your `master` branch by using the `--onto` option of `git rebase`:
76+
You can take the changes on `client` that aren't on `server` (`C8` and `C9`) and replay them on your `master` branch by using the `--onto` option of `git rebase`:
7777

7878
[source,console]
7979
----
@@ -99,7 +99,7 @@ $ git merge client
9999
image::images/interesting-rebase-3.png[Fast-forwarding your master branch to include the client branch changes.]
100100

101101
Let's say you decide to pull in your server branch as well.
102-
You can rebase the server branch onto the `master` branch without having to check it out first by running `git rebase <basebranch> <topicbranch>` -- which checks out the topic branch (in this case, `server`) for you and replays it onto the base branch (`master`):
102+
You can rebase the `server` branch onto the `master` branch without having to check it out first by running `git rebase <basebranch> <topicbranch>` -- which checks out the topic branch (in this case, `server`) for you and replays it onto the base branch (`master`):
103103

104104
[source,console]
105105
----
@@ -201,7 +201,7 @@ So instead of the result we see in <<_merge_rebase_work>>, we would end up with
201201
.Rebase on top of force-pushed rebase work.
202202
image::images/perils-of-rebasing-5.png[Rebase on top of force-pushed rebase work.]
203203

204-
This only works if C4 and C4' that your partner made are almost exactly the same patch.
204+
This only works if `C4` and `C4'` that your partner made are almost exactly the same patch.
205205
Otherwise the rebase won't be able to tell that it's a duplicate and will add another C4-like patch (which will probably fail to apply cleanly, since the changes would already be at least somewhat there).
206206

207207
You can also simplify this by running a `git pull --rebase` instead of a normal `git pull`.
@@ -229,7 +229,7 @@ That's how it happened, and the repository should preserve that for posterity.
229229

230230
The opposing point of view is that the commit history is the *story of how your project was made.*
231231
You wouldn't publish the first draft of a book, and the manual for how to maintain your software deserves careful editing.
232-
This is the camp that uses tools like rebase and filter-branch to tell the story in the way that's best for future readers.
232+
This is the camp that uses tools like `rebase` and `filter-branch` to tell the story in the way that's best for future readers.
233233

234234
Now, to the question of whether merging or rebasing is better: hopefully you'll see that it's not that simple.
235235
Git is a powerful tool, and allows you to do many things to and with your history, but every team and every project is different.

book/03-git-branching/sections/remote-branches.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
(((branches, remote)))(((references, remote)))
55
Remote references are references (pointers) in your remote repositories, including branches, tags, and so on.
6-
You can get a full list of remote references explicitly with `git ls-remote [remote]`, or `git remote show [remote]` for remote branches as well as more information.
6+
You can get a full list of remote references explicitly with `git ls-remote <remote>`, or `git remote show <remote>` for remote branches as well as more information.
77
Nevertheless, a more common way is to take advantage of remote-tracking branches.
88

99
Remote-tracking branches are references to the state of remote branches.
@@ -31,7 +31,7 @@ If you run `git clone -o booyah` instead, then you will have `booyah/master` as
3131
image::images/remote-branches-1.png[Server and local repositories after cloning.]
3232

3333
If you do some work on your local `master` branch, and, in the meantime, someone else pushes to `git.ourcompany.com` and updates its `master` branch, then your histories move forward differently.
34-
Also, as long as you stay out of contact with your origin server, your `origin/master` pointer doesn't move.
34+
Also, as long as you stay out of contact with your `origin` server, your `origin/master` pointer doesn't move.
3535

3636
.Local and remote work can diverge
3737
image::images/remote-branches-2.png[Local and remote work can diverge.]
@@ -80,7 +80,7 @@ To https://github.com/schacon/simplegit
8080
----
8181

8282
This is a bit of a shortcut.
83-
Git automatically expands the `serverfix` branchname out to `refs/heads/serverfix:refs/heads/serverfix`, which means, ``Take my serverfix local branch and push it to update the remote's serverfix branch.''
83+
Git automatically expands the `serverfix` branchname out to `refs/heads/serverfix:refs/heads/serverfix`, which means, ``Take my `serverfix` local branch and push it to update the remote's `serverfix` branch.''
8484
We'll go over the `refs/heads/` part in detail in <<ch10-git-internals#ch10-git-internals>>, but you can generally leave it off.
8585
You can also do `git push origin serverfix:serverfix`, which does the same thing -- it says, ``Take my serverfix and make it the remote's serverfix.''
8686
You can use this format to push a local branch into a remote branch that is named differently.

0 commit comments

Comments
 (0)