Skip to content

Commit d9d0b4f

Browse files
committed
Fix minor issues
1 parent a76dfab commit d9d0b4f

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

book/04-git-server/sections/hosted.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
If you don't want to go through all of the work involved in setting up your own Git server, you have several options for hosting your Git projects on an external dedicated hosting site.
44
Doing so offers a number of advantages: a hosting site is generally quick to set up and easy to start projects on, and no server maintenance or monitoring is involved.
5-
Even if you set up and run your own server internally, you may still want to use a public hosting site for your open source code it's generally easier for the open source community to find and help you with.
5+
Even if you set up and run your own server internally, you may still want to use a public hosting site for your open source code -- it's generally easier for the open source community to find and help you with.
66

77
These days, you have a huge number of hosting options to choose from, each with different advantages and disadvantages.
88
To see an up-to-date list, check out the GitHosting page on the main Git wiki at https://git.wiki.kernel.org/index.php/GitHosting[].

book/06-github/sections/3-maintaining.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This takes you to the "`new repository`" form:
2121
image::images/newrepoform.png[The “new repository” form]
2222

2323
All you really have to do here is provide a project name; the rest of the fields are completely optional.
24-
For now, just click the "`Create Repository`" button, and boom you have a new repository on GitHub, named `<user>/<project_name>`.
24+
For now, just click the "`Create Repository`" button, and boom -- you have a new repository on GitHub, named `<user>/<project_name>`.
2525

2626
Since you have no code there yet, GitHub will show you instructions for how to create a brand-new Git repository, or connect an existing Git project.
2727
We won't belabor this here; if you need a refresher, check out <<ch02-git-basics-chapter#ch02-git-basics-chapter>>.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(((credentials)))
55
(((git commands, credential)))
66
If you use the SSH transport for connecting to remotes, it's possible for you to have a key without a passphrase, which allows you to securely transfer data without typing in your username and password.
7-
However, this isn't possible with the HTTP protocols every connection needs a username and password.
7+
However, this isn't possible with the HTTP protocols -- every connection needs a username and password.
88
This gets even harder for systems with two-factor authentication, where the token you use for a password is randomly generated and unpronounceable.
99

1010
Fortunately, Git has a credentials system that can help with this.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ Submodules changed but not updated:
415415
no changes added to commit (use "git add" and/or "git commit -a")
416416
----
417417

418-
By default, the `git pull` command recursively fetches submodules changes, as we can see in the output of the first command above.
418+
By default, the `git pull` command recursively fetches submodules changes, as we can see in the output of the first command above.
419419
However, it does not *update* the submodules.
420420
This is shown by the output of the `git status` command, which shows the submodule is "`modified`", and has "`new commits`".
421421
What's more, the brackets showing the new commits point left (<), indicating that these commits are recorded in MainProject but are not present in the local DbConnector checkout.
@@ -500,7 +500,7 @@ Submodule path 'DbConnector': merged in '92c7337b30ef9e0893e758dac2459d07362ab5e
500500
----
501501

502502
If we go into the DbConnector directory, we have the new changes already merged into our local `stable` branch.
503-
Now let's see what happens when we make our own local change to the library and someone else pushes another change upstream at the same time.
503+
Now let's see what happens when we make our own local change to the library and someone else pushes another change to the upstream at the same time.
504504

505505
[source,console]
506506
----
@@ -608,7 +608,7 @@ to push them to a remote.
608608

609609
As you can see, it also gives us some helpful advice on what we might want to do next.
610610
The simple option is to go into each submodule and manually push to the remotes to make sure they're externally available and then try this push again.
611-
If you want the check behavior to happen for all pushes, you can make this behavior the default by doing `git config push.recurseSubmodules check`.
611+
If you want the "`check`" behavior to happen for all pushes, you can make this behavior the default by doing `git config push.recurseSubmodules check`.
612612

613613
The other option is to use the "`on-demand`" value, which will try to do this for you.
614614

@@ -973,7 +973,7 @@ Indeed, if you switch between branches that record the submodule at different co
973973
That is because the submodule state is by default not carried over when switching branches.
974974

975975
This can be really confusing, so it's a good idea to always `git checkout --recurse-submodules` when your project has submodules.
976-
For older Git versions that do not have the `--recurse-submodules` flag, after the checkout you can use `git submodule update --init --recursive` to put the submodules in the right state.
976+
For older Git versions that do not have the `--recurse-submodules` flag, after the checkout you can use `git submodule update --init --recursive` to put the submodules in the right state.
977977

978978
Luckily, you can tell Git (>=2.14) to always use the `--recurse-submodules` flag by setting the configuration option `submodule.recurse`: `git config submodule.recurse true`.
979979
As noted above, this will also make Git recurse into submodules for every command that has a `--recurse-submodules` option (except `git clone`).
@@ -1008,7 +1008,7 @@ Checking connectivity... done.
10081008
----
10091009

10101010
Now suppose you did that in a branch.
1011-
If you try to switch back to a branch where those files are still in the actual tree rather than a submodule you get this error:
1011+
If you try to switch back to a branch where those files are still in the actual tree rather than a submodule -- you get this error:
10121012

10131013
[source,console]
10141014
----

book/07-git-tools/sections/subtree-merges.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ We just switched back to your `master` branch, and we pull the `rack_branch` bra
5757
$ git read-tree --prefix=rack/ -u rack_branch
5858
----
5959

60-
When we commit, it looks like we have all the Rack files under that subdirectory as though we copied them in from a tarball.
60+
When we commit, it looks like we have all the Rack files under that subdirectory -- as though we copied them in from a tarball.
6161
What gets interesting is that we can fairly easily merge changes from one of the branches to the other.
6262
So, if the Rack project updates, we can pull in upstream changes by switching to that branch and pulling:
6363

@@ -80,14 +80,14 @@ Automatic merge went well; stopped before committing as requested
8080
----
8181

8282
All the changes from the Rack project are merged in and ready to be committed locally.
83-
You can also do the opposite make changes in the `rack` subdirectory of your `master` branch and then merge them into your `rack_branch` branch later to submit them to the maintainers or push them upstream.
83+
You can also do the opposite -- make changes in the `rack` subdirectory of your `master` branch and then merge them into your `rack_branch` branch later to submit them to the maintainers or push them upstream.
8484

8585
This gives us a way to have a workflow somewhat similar to the submodule workflow without using submodules (which we will cover in <<ch07-git-tools#_git_submodules>>).
8686
We can keep branches with other related projects in our repository and subtree merge them into our project occasionally.
8787
It is nice in some ways, for example all the code is committed to a single place.
8888
However, it has other drawbacks in that it's a bit more complex and easier to make mistakes in reintegrating changes or accidentally pushing a branch into an unrelated repository.
8989

90-
Another slightly weird thing is that to get a diff between what you have in your `rack` subdirectory and the code in your `rack_branch` branch to see if you need to merge them you can't use the normal `diff` command.
90+
Another slightly weird thing is that to get a diff between what you have in your `rack` subdirectory and the code in your `rack_branch` branch -- to see if you need to merge them -- you can't use the normal `diff` command.
9191
Instead, you must run `git diff-tree` with the branch you want to compare to:
9292

9393
[source,console]

0 commit comments

Comments
 (0)