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/01-introduction/sections/about-version-control.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ To deal with this issue, programmers long ago developed local VCSs that had a si
23
23
image::images/local.png[Local version control diagram]
24
24
25
25
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.
Copy file name to clipboardExpand all lines: book/01-introduction/sections/help.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ $ git help config
18
18
----
19
19
20
20
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/[^].
22
22
These channels are regularly filled with hundreds of people who are all very knowledgeable about Git and are often willing to help.(((IRC)))
23
23
24
24
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:
Copy file name to clipboardExpand all lines: book/01-introduction/sections/installing.asc
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ You can either install it as a package or via another installer, or download the
6
6
7
7
[NOTE]
8
8
====
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.
12
12
====
13
13
14
14
==== Installing on Linux
@@ -29,7 +29,7 @@ If you're on a Debian-based distribution, such as Ubuntu, try `apt`:
29
29
$ sudo apt install git-all
30
30
----
31
31
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[^].
33
33
34
34
==== Installing on macOS
35
35
@@ -46,7 +46,7 @@ $ git --version
46
46
If you don't have it installed already, it will prompt you to install it.
47
47
48
48
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[^].
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.
91
91
====
92
92
93
93
If you're using a Debian-based distribution (Debian/Ubuntu/Ubuntu-derivatives), you also need the `install-info` package:
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[^].
118
118
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.
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/recording-changes.asc
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,15 @@ Finally, the command tells you which branch you're on and informs you that it ha
36
36
For now, that branch is always `master`, which is the default; you won't worry about it here.
37
37
<<ch03-git-branching#ch03-git-branching>> will go over branches and references in detail.
38
38
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
+
39
48
Let's say you add a new file to your project, a simple `README` file.
40
49
If the file didn't exist before, and you run `git status`, you see your untracked file like so:
41
50
@@ -254,7 +263,7 @@ doc/**/*.pdf
254
263
255
264
[TIP]
256
265
====
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.
258
267
====
259
268
260
269
[NOTE]
@@ -617,4 +626,4 @@ $ git add README
617
626
618
627
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.
619
628
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.
0 commit comments