Skip to content

Commit 3a18e4e

Browse files
authored
Merge branch 'main' into patch-1
2 parents 5ffc265 + 3934272 commit 3a18e4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+116
-108
lines changed

.github/workflows/pr-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212

1313
- name: Set up Ruby
1414
uses: ruby/setup-ruby@v1

.github/workflows/release-on-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
release:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
1414

Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
source 'https://rubygems.org'
22

33
gem 'rake', '13.0.6'
4-
gem 'asciidoctor', '2.0.16'
4+
gem 'asciidoctor', '2.0.17'
55

6-
gem 'json', '2.6.1'
6+
gem 'json', '2.6.2'
77
gem 'awesome_print', '1.9.2'
88

99
gem 'asciidoctor-epub3', '1.5.1'
10-
gem 'asciidoctor-pdf', '1.6.1'
10+
gem 'asciidoctor-pdf', '2.3.0'
1111

1212
gem 'coderay', '1.1.3'
13-
gem 'pygments.rb', '2.2.0'
13+
gem 'pygments.rb', '2.3.0'
1414
gem 'thread_safe', '0.3.6'
1515
gem 'epubcheck-ruby', '4.2.6.0'
16-
gem 'html-proofer', '3.19.3'
16+
gem 'html-proofer', '4.4.0'
1717
gem 'kindlegen', '3.1.1'

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace :book do
9898
task :check => [:build_html, :build_epub] do
9999
puts 'Checking generated books'
100100

101-
sh "htmlproofer --check-html progit.html"
101+
sh "htmlproofer progit.html"
102102
sh "epubcheck progit.epub"
103103
end
104104

book/01-introduction/sections/about-version-control.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To deal with this issue, programmers long ago developed local VCSs that had a si
2323
image::images/local.png[Local version control diagram]
2424

2525
One of the most popular VCS tools was a system called RCS, which is still distributed with many computers today.
26-
https://www.gnu.org/software/rcs/[RCS] works by keeping patch sets (that is, the differences between files) in a special format on disk; it can then re-create what any file looked like at any point in time by adding up all the patches.
26+
https://www.gnu.org/software/rcs/[RCS^] works by keeping patch sets (that is, the differences between files) in a special format on disk; it can then re-create what any file looked like at any point in time by adding up all the patches.
2727

2828
==== Centralized Version Control Systems
2929

book/01-introduction/sections/first-time-setup.asc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ You may find, if you don't setup your editor like this, you get into a really co
8484
An example on a Windows system may include a prematurely terminated Git operation during a Git initiated edit.
8585
====
8686

87+
[[_default_branch]]
8788
==== Your default branch name
8889

8990
By default Git will create a branch called _master_ when you create a new repository with `git init`.

book/01-introduction/sections/help.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ git help config
1818
----
1919

2020
These commands are nice because you can access them anywhere, even offline.
21-
If the manpages and this book aren't enough and you need in-person help, you can try the `#git`, `#github`, or `#gitlab` channels on the Libera Chat IRC server, which can be found at https://libera.chat/[].
21+
If the manpages and this book aren't enough and you need in-person help, you can try the `#git`, `#github`, or `#gitlab` channels on the Libera Chat IRC server, which can be found at https://libera.chat/[^].
2222
These channels are regularly filled with hundreds of people who are all very knowledgeable about Git and are often willing to help.(((IRC)))
2323

2424
In addition, if you don't need the full-blown manpage help, but just need a quick refresher on the available options for a Git command, you can ask for the more concise "`help`" output with the `-h` option, as in:

book/01-introduction/sections/installing.asc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ You can either install it as a package or via another installer, or download the
66

77
[NOTE]
88
====
9-
This book was written using Git version *2.8.0*.
10-
Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently if you're using an older version.
11-
Since Git is quite excellent at preserving backwards compatibility, any version after 2.8 should work just fine.
9+
This book was written using Git version 2.
10+
Since Git is quite excellent at preserving backwards compatibility, any recent version should work just fine.
11+
Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently.
1212
====
1313

1414
==== Installing on Linux
@@ -29,7 +29,7 @@ If you're on a Debian-based distribution, such as Ubuntu, try `apt`:
2929
$ sudo apt install git-all
3030
----
3131

32-
For more options, there are instructions for installing on several different Unix distributions on the Git website, at https://git-scm.com/download/linux[].
32+
For more options, there are instructions for installing on several different Unix distributions on the Git website, at https://git-scm.com/download/linux[^].
3333

3434
==== Installing on macOS
3535

@@ -46,7 +46,7 @@ $ git --version
4646
If you don't have it installed already, it will prompt you to install it.
4747

4848
If you want a more up to date version, you can also install it via a binary installer.
49-
A macOS Git installer is maintained and available for download at the Git website, at https://git-scm.com/download/mac[].
49+
A macOS Git installer is maintained and available for download at the Git website, at https://git-scm.com/download/mac[^].
5050

5151
.Git macOS Installer
5252
image::images/git-osx-installer.png[Git macOS installer]
@@ -55,10 +55,10 @@ image::images/git-osx-installer.png[Git macOS installer]
5555

5656
There are also a few ways to install Git on Windows.(((Windows, installing)))
5757
The most official build is available for download on the Git website.
58-
Just go to https://git-scm.com/download/win[] and the download will start automatically.
59-
Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to https://gitforwindows.org[].
58+
Just go to https://git-scm.com/download/win[^] and the download will start automatically.
59+
Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to https://gitforwindows.org[^].
6060

61-
To get an automated installation you can use the https://chocolatey.org/packages/git[Git Chocolatey package].
61+
To get an automated installation you can use the https://chocolatey.org/packages/git[Git Chocolatey package^].
6262
Note that the Chocolatey package is community maintained.
6363

6464
==== Installing from Source
@@ -87,7 +87,7 @@ $ sudo apt-get install asciidoc xmlto docbook2x
8787

8888
[NOTE]
8989
====
90-
Users of RHEL and RHEL-derivatives like CentOS and Scientific Linux will have to https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[enable the EPEL repository] to download the `docbook2X` package.
90+
Users of RHEL and RHEL-derivatives like CentOS and Scientific Linux will have to https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[enable the EPEL repository^] to download the `docbook2X` package.
9191
====
9292

9393
If you're using a Debian-based distribution (Debian/Ubuntu/Ubuntu-derivatives), you also need the `install-info` package:
@@ -114,7 +114,7 @@ $ sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
114114
due to binary name differences.
115115

116116
When you have all the necessary dependencies, you can go ahead and grab the latest tagged release tarball from several places.
117-
You can get it via the kernel.org site, at https://www.kernel.org/pub/software/scm/git[], or the mirror on the GitHub website, at https://github.com/git/git/releases[].
117+
You can get it via the kernel.org site, at https://www.kernel.org/pub/software/scm/git[], or the mirror on the GitHub website, at https://github.com/git/git/releases[^].
118118
It's generally a little clearer what the latest version is on the GitHub page, but the kernel.org page also has release signatures if you want to verify your download.
119119

120120
Then, compile and install:

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ Finally, the command tells you which branch you're on and informs you that it ha
3636
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

39+
[NOTE]
40+
====
41+
GitHub changed the default branch name from `master` to `main` in mid-2020, and other Git hosts followed suit.
42+
So you may find that the default branch name in some newly created repositories is `main` and not `master`.
43+
In addition, the default branch name can be changed (as you have seen in <<ch01-getting-started#_default_branch>>), so you may see a different name for the default branch.
44+
45+
However, Git itself still uses `master` as the default, so we will use it throughout the book.
46+
====
47+
3948
Let's say you add a new file to your project, a simple `README` file.
4049
If the file didn't exist before, and you run `git status`, you see your untracked file like so:
4150

@@ -254,7 +263,7 @@ doc/**/*.pdf
254263

255264
[TIP]
256265
====
257-
GitHub maintains a fairly comprehensive list of good `.gitignore` file examples for dozens of projects and languages at https://github.com/github/gitignore[] if you want a starting point for your project.
266+
GitHub maintains a fairly comprehensive list of good `.gitignore` file examples for dozens of projects and languages at https://github.com/github/gitignore[^] if you want a starting point for your project.
258267
====
259268

260269
[NOTE]
@@ -617,4 +626,4 @@ $ git add README
617626

618627
Git figures out that it's a rename implicitly, so it doesn't matter if you rename a file that way or with the `mv` command.
619628
The only real difference is that `git mv` is one command instead of three -- it's a convenience function.
620-
More importantly, you can use any tool you like to rename a file, and address the add/rm later, before you commit.
629+
More importantly, you can use any tool you like to rename a file, and address the `add`/`rm` later, before you commit.

book/03-git-branching/sections/branch-management.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Now we end up with the following state:
153153

154154
[source,console]
155155
----
156-
git branch --all
156+
$ git branch --all
157157
* main
158158
remotes/origin/HEAD -> origin/master
159159
remotes/origin/main

0 commit comments

Comments
 (0)