Skip to content

Commit 9575d06

Browse files
authored
Merge pull request #1362 from Morganov/fix-formatting
Use monosace font for 'master' branch name
2 parents 6e1eaa1 + 2849047 commit 9575d06

File tree

17 files changed

+40
-40
lines changed

17 files changed

+40
-40
lines changed

C-git-commands.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ To take a directory and turn it into a new Git repository so you can start versi
9595

9696
We first introduce this in <<ch02-git-basics-chapter#_getting_a_repo>>, where we show creating a brand new repository to start working with.
9797

98-
We talk briefly about how you can change the default branch from ``master'' in <<ch03-git-branching#_remote_branches>>.
98+
We talk briefly about how you can change the default branch name from ``master'' in <<ch03-git-branching#_remote_branches>>.
9999

100100
We use this command to create an empty bare repository for a server in <<ch04-git-on-the-server#_bare_repo>>.
101101

book/02-git-basics/sections/recording-changes.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ nothing to commit, working directory clean
3333
This means you have a clean working directory; in other words, none of your tracked files are modified.
3434
Git also doesn't see any untracked files, or they would be listed here.
3535
Finally, the command tells you which branch you're on and informs you that it has not diverged from the same branch on the server.
36-
For now, that branch is always ``master'', which is the default; you won't worry about it here.
36+
For now, that branch is always `master`, which is the default; you won't worry about it here.
3737
<<ch03-git-branching#ch03-git-branching>> will go over branches and references in detail.
3838

3939
Let's say you add a new file to your project, a simple `README` file.

book/02-git-basics/sections/remotes.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ From https://github.com/paulboone/ticgit
102102
* [new branch] ticgit -> pb/ticgit
103103
----
104104

105-
Paul's master branch is now accessible locally as `pb/master` -- you can merge it into one of your branches, or you can check out a local branch at that point if you want to inspect it.
105+
Paul's `master` branch is now accessible locally as `pb/master` -- you can merge it into one of your branches, or you can check out a local branch at that point if you want to inspect it.
106106
(We'll go over what branches are and how to use them in much more detail in <<ch03-git-branching#ch03-git-branching>>.)
107107

108108
[[_fetching_and_pulling]]
@@ -124,15 +124,15 @@ It's important to note that the `git fetch` command only downloads the data to y
124124
You have to merge it manually into your work when you're ready.
125125

126126
If your current branch is set up to track a remote branch (see the next section and <<ch03-git-branching#ch03-git-branching>> for more information), you can use the `git pull` command to automatically fetch and then merge that remote branch into your current branch.(((git commands, pull)))
127-
This may be an easier or more comfortable workflow for you; and by default, the `git clone` command automatically sets up your local master branch to track the remote master branch (or whatever the default branch is called) on the server you cloned from.
127+
This may be an easier or more comfortable workflow for you; and by default, the `git clone` command automatically sets up your local `master` branch to track the remote `master` branch (or whatever the default branch is called) on the server you cloned from.
128128
Running `git pull` generally fetches data from the server you originally cloned from and automatically tries to merge it into the code you're currently working on.
129129

130130
[[_pushing_remotes]]
131131
==== Pushing to Your Remotes
132132

133133
When you have your project at a point that you want to share, you have to push it upstream.
134134
The command for this is simple: `git push <remote> <branch>`.(((git commands, push)))
135-
If you want to push your master branch to your `origin` server (again, cloning generally sets up both of those names for you automatically), then you can run this to push any commits you've done back up to the server:
135+
If you want to push your `master` branch to your `origin` server (again, cloning generally sets up both of those names for you automatically), then you can run this to push any commits you've done back up to the server:
136136

137137
[source,console]
138138
----
@@ -167,7 +167,7 @@ $ git remote show origin
167167
----
168168

169169
It lists the URL for the remote repository as well as the tracking branch information.
170-
The command helpfully tells you that if you're on the master branch and you run `git pull`, it will automatically merge in the master branch on the remote after it fetches all the remote references.
170+
The command helpfully tells you that if you're on the `master` branch and you run `git pull`, it will automatically merge in the `master` branch on the remote after it fetches all the remote references.
171171
It also lists all the remote references it has pulled down.
172172

173173
That is a simple example you're likely to encounter.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ f30ab (HEAD -> master, testing) add feature #32 - ability to add new formats to
8585
98ca9 The initial commit of my project
8686
----
8787

88-
You can see the ``master'' and ``testing'' branches that are right there next to the `f30ab` commit.
88+
You can see the `master` and `testing` branches that are right there next to the `f30ab` commit.
8989

9090
[[_switching_branches]]
9191
==== Switching Branches

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ $ git checkout master
4646
$ git merge experiment
4747
----
4848

49-
.Fast-forwarding the master branch
50-
image::images/basic-rebase-4.png[Fast-forwarding the master branch.]
49+
.Fast-forwarding the `master` branch
50+
image::images/basic-rebase-4.png[Fast-forwarding the `master` branch.]
5151

5252
Now, the snapshot pointed to by `C4'` is exactly the same as the one that was pointed to by `C5` in <<rebasing-merging-example,the merge example>>.
5353
There is no difference in the end product of the integration, but rebasing makes for a cleaner history.
@@ -95,8 +95,8 @@ $ git merge client
9595
----
9696

9797
[[rbdiag_g]]
98-
.Fast-forwarding your master branch to include the client branch changes
99-
image::images/interesting-rebase-3.png[Fast-forwarding your master branch to include the client branch changes.]
98+
.Fast-forwarding your `master` branch to include the client branch changes
99+
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.
102102
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`):
@@ -109,8 +109,8 @@ $ git rebase master server
109109
This replays your `server` work on top of your `master` work, as shown in <<rbdiag_h>>.
110110

111111
[[rbdiag_h]]
112-
.Rebasing your server branch on top of your master branch
113-
image::images/interesting-rebase-4.png[Rebasing your server branch on top of your master branch.]
112+
.Rebasing your server branch on top of your `master` branch
113+
image::images/interesting-rebase-4.png[Rebasing your server branch on top of your `master` branch.]
114114

115115
Then, you can fast-forward the base branch (`master`):
116116

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ We'll go over this syntax in detail in <<ch07-git-tools#_commit_ranges>>.
259259
From the above output, we can see that there is a single commit that John has made that Jessica has not merged into her local work.
260260
If she merges `origin/master`, that is the single commit that will modify her local work.
261261

262-
Now, Jessica can merge her topic work into her master branch, merge John's work (`origin/master`) into her `master` branch, and then push back to the server again.
262+
Now, Jessica can merge her topic work into her `master` branch, merge John's work (`origin/master`) into her `master` branch, and then push back to the server again.
263263

264-
First (having committed all of the work on her `issue54` topic branch), Jessica switches back to her master branch in preparation for integrating all this work:
264+
First (having committed all of the work on her `issue54` topic branch), Jessica switches back to her `master` branch in preparation for integrating all this work:
265265

266266
[source,console]
267267
----
@@ -534,8 +534,8 @@ $ git remote add myfork <url>
534534
----
535535

536536
You then need to push your new work to this repository.
537-
It's easiest to push the topic branch you're working on to your forked repository, rather than merging that work into your master branch and pushing that.
538-
The reason is that if your work isn't accepted or is cherry-picked, you don't have to rewind your master branch (the Git `cherry-pick` operation is covered in more detail in <<ch05-distributed-git#_rebase_cherry_pick>>).
537+
It's easiest to push the topic branch you're working on to your forked repository, rather than merging that work into your `master` branch and pushing that.
538+
The reason is that if your work isn't accepted or is cherry-picked, you don't have to rewind your `master` branch (the Git `cherry-pick` operation is covered in more detail in <<ch05-distributed-git#_rebase_cherry_pick>>).
539539
If the maintainers `merge`, `rebase`, or `cherry-pick` your work, you'll eventually get it back via pulling from their repository anyhow.
540540

541541
In any event, you can push your work with:

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ Now you have a topic branch that contains contributed work.
225225
At this point, you can determine what you'd like to do with it.
226226
This section revisits a couple of commands so you can see how you can use them to review exactly what you'll be introducing if you merge this into your main branch.
227227

228-
It's often helpful to get a review of all the commits that are in this branch but that aren't in your master branch.
229-
You can exclude commits in the master branch by adding the `--not` option before the branch name.
228+
It's often helpful to get a review of all the commits that are in this branch but that aren't in your `master` branch.
229+
You can exclude commits in the `master` branch by adding the `--not` option before the branch name.
230230
This does the same thing as the `master..contrib` format that we used earlier.
231231
For example, if your contributor sends you two patches and you create a branch called `contrib` and applied those patches there, you can run this:
232232

@@ -263,8 +263,8 @@ For example, if you've added a line in a file on the `master` branch, a direct c
263263

264264
If `master` is a direct ancestor of your topic branch, this isn't a problem; but if the two histories have diverged, the diff will look like you're adding all the new stuff in your topic branch and removing everything unique to the `master` branch.
265265

266-
What you really want to see are the changes added to the topic branch -- the work you'll introduce if you merge this branch with master.
267-
You do that by having Git compare the last commit on your topic branch with the first common ancestor it has with the master branch.
266+
What you really want to see are the changes added to the topic branch -- the work you'll introduce if you merge this branch with `master`.
267+
You do that by having Git compare the last commit on your topic branch with the first common ancestor it has with the `master` branch.
268268

269269
Technically, you can do that by explicitly figuring out the common ancestor and then running your diff on it:
270270

@@ -290,7 +290,7 @@ In the context of the `git diff` command, you can put three periods after anothe
290290
$ git diff master...contrib
291291
----
292292

293-
This command shows you only the work your current topic branch has introduced since its common ancestor with master.
293+
This command shows you only the work your current topic branch has introduced since its common ancestor with `master`.
294294
That is a very useful syntax to remember.
295295

296296
==== Integrating Contributed Work
@@ -370,8 +370,8 @@ To clearly understand this you could check out the https://github.com/git/git/bl
370370
===== Rebasing and Cherry-Picking Workflows
371371

372372
(((workflows, rebasing and cherry-picking)))
373-
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.
374-
When you have work in a topic branch and have determined that you want to integrate it, you move to that branch and run the rebase command to rebuild the changes on top of your current master (or `develop`, and so on) branch.
373+
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.
374+
When you have work in a topic branch and have determined that you want to integrate it, you move to that branch and run the rebase command to rebuild the changes on top of your current `master` (or `develop`, and so on) branch.
375375
If that works well, you can fast-forward your `master` branch, and you'll end up with a linear project history.
376376

377377
(((git commands, cherry-pick)))
@@ -384,7 +384,7 @@ For example, suppose you have a project that looks like this:
384384
.Example history before a cherry-pick.
385385
image::images/rebasing-1.png[Example history before a cherry-pick.]
386386

387-
If you want to pull commit `e43a6` into your master branch, you can run
387+
If you want to pull commit `e43a6` into your `master` branch, you can run
388388

389389
[source,console]
390390
----
@@ -517,7 +517,7 @@ $ ls *.tar.gz
517517
v1.6.2-rc1-20-g8c5b85c.tar.gz
518518
----
519519
520-
If someone opens that tarball, they get the latest snapshot of your project under a project directory.
520+
If someone opens that tarball, they get the latest snapshot of your project under a `project` directory.
521521
You can also create a zip archive in much the same way, but by passing the `--format=zip` option to `git archive`:
522522
523523
[source,console]

book/07-git-tools/sections/bundling.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Unlike the network protocols which figure out the minimum set of data to transfe
8484

8585
In order to do that, you'll have to calculate the difference.
8686
As we described in <<ch07-git-tools#_commit_ranges>>, you can specify a range of commits in a number of ways.
87-
To get the three commits that we have in our master branch that weren't in the branch we originally cloned, we can use something like `origin/master..master` or `master ^origin/master`.
87+
To get the three commits that we have in our `master` branch that weren't in the branch we originally cloned, we can use something like `origin/master..master` or `master ^origin/master`.
8888
You can test that with the `log` command.
8989

9090
[source,console]
@@ -145,7 +145,7 @@ $ git bundle list-heads ../commits.bundle
145145

146146
The `verify` sub-command will tell you the heads as well.
147147
The point is to see what can be pulled in, so you can use the `fetch` or `pull` commands to import commits from this bundle.
148-
Here we'll fetch the 'master' branch of the bundle to a branch named 'other-master' in our repository:
148+
Here we'll fetch the `master` branch of the bundle to a branch named `other-master` in our repository:
149149

150150
[source,console]
151151
----
@@ -154,7 +154,7 @@ From ../commits.bundle
154154
* [new branch] master -> other-master
155155
----
156156

157-
Now we can see that we have the imported commits on the 'other-master' branch as well as any commits we've done in the meantime in our own 'master' branch.
157+
Now we can see that we have the imported commits on the `other-master` branch as well as any commits we've done in the meantime in our own `master` branch.
158158

159159
[source,console]
160160
----

book/07-git-tools/sections/replace.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The second line will just be commits four and five - that will be the recent his
3131

3232
image::images/replace1.png[]
3333

34-
Well, creating the historical history is easy, we can just put a branch in the history and then push that branch to the master branch of a new remote repository.
34+
Well, creating the historical history is easy, we can just put a branch in the history and then push that branch to the `master` branch of a new remote repository.
3535

3636
[source,console]
3737
----
@@ -151,7 +151,7 @@ c1822cf first commit
151151
----
152152

153153
To combine them, you can simply call `git replace` with the commit you want to replace and then the commit you want to replace it with.
154-
So we want to replace the "fourth" commit in the master branch with the "fourth" commit in the `project-history/master` branch:
154+
So we want to replace the "fourth" commit in the `master` branch with the "fourth" commit in the `project-history/master` branch:
155155

156156
[source,console]
157157
----

book/07-git-tools/sections/rerere.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ You can see that it "Recorded resolution for FILE".
145145

146146
image::images/rerere2.png[]
147147

148-
Now, let's undo that merge and then rebase it on top of our master branch instead.
148+
Now, let's undo that merge and then rebase it on top of our `master` branch instead.
149149
We can move our branch back by using `git reset` as we saw in <<ch07-git-tools#_git_reset>>.
150150

151151
[source,console]
@@ -249,4 +249,4 @@ $ git rebase --continue
249249
Applying: i18n one word
250250
----
251251

252-
So, if you do a lot of re-merges, or want to keep a topic branch up to date with your master branch without a ton of merges, or you rebase often, you can turn on `rerere` to help your life out a bit.
252+
So, if you do a lot of re-merges, or want to keep a topic branch up to date with your `master` branch without a ton of merges, or you rebase often, you can turn on `rerere` to help your life out a bit.

0 commit comments

Comments
 (0)