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
- Bump Asciidoctor from 1.5.6.2 to 2.0.11
- Change style to new specifications.
- Pin dependencies
- Fix unintended highlighting of text
- Undo rake script on Markdown file
- Undo rake script on Ruby file
Co-authored-by: HonkingGoose <[email protected]>
Copy file name to clipboardexpand all lines: C-git-commands.asc
+5-5
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ In <<ch08-customizing-git#_keyword_expansion>> we showed how to set up smudge an
41
41
42
42
Finally, basically the entirety of <<ch08-customizing-git#_git_config>> is dedicated to the command.
43
43
44
-
[[_core_editor]]
44
+
[[ch_core_editor]]
45
45
==== git config core.editor commands
46
46
47
47
Accompanying the configuration instructions in <<ch01-getting-started#_editor>>, many editors can be set as follows:
@@ -97,7 +97,7 @@ To take a directory and turn it into a new Git repository so you can start versi
97
97
98
98
We first introduce this in <<ch02-git-basics-chapter#_getting_a_repo>>, where we show creating a brand new repository to start working with.
99
99
100
-
We talk briefly about how you can change the default branch name from ``master'' in <<ch03-git-branching#_remote_branches>>.
100
+
We talk briefly about how you can change the default branch name from "`master`" in <<ch03-git-branching#_remote_branches>>.
101
101
102
102
We use this command to create an empty bare repository for a server in <<ch04-git-on-the-server#_bare_repo>>.
103
103
@@ -127,7 +127,7 @@ For the basic workflow of staging content and committing it to your history, the
127
127
128
128
==== git add
129
129
130
-
The `git add` command adds content from the working directory into the staging area (or ``index'') for the next commit.
130
+
The `git add` command adds content from the working directory into the staging area (or "`index`") for the next commit.
131
131
When the `git commit` command is run, by default it only looks at this staging area, so `git add` is used to craft what exactly you would like your next commit snapshot to look like.
132
132
133
133
This command is an incredibly important command in Git and is mentioned or used dozens of times in this book.
@@ -367,7 +367,7 @@ This can help you be very specific about what work you wish to share.
367
367
==== git remote
368
368
369
369
The `git remote` command is a management tool for your record of remote repositories.
370
-
It allows you to save long URLs as short handles, such as ``origin'' so you don't have to type them out all the time.
370
+
It allows you to save long URLs as short handles, such as "`origin`" so you don't have to type them out all the time.
371
371
You can have several of these and the `git remote` command is used to add, change and delete them.
372
372
373
373
This command is covered in detail in <<ch02-git-basics-chapter#_remote_repos>>, including listing, adding, removing and renaming them.
@@ -543,7 +543,7 @@ If you're administering a Git repository or need to fix something in a big way,
543
543
544
544
==== git gc
545
545
546
-
The `git gc` command runs ``garbage collection'' on your repository, removing unnecessary files in your database and packing up the remaining files into a more efficient format.
546
+
The `git gc` command runs "`garbage collection`" on your repository, removing unnecessary files in your database and packing up the remaining files into a more efficient format.
547
547
548
548
This command normally runs in the background for you, though you can manually run it if you wish.
549
549
We go over some examples of this in <<ch10-git-internals#_git_gc>>.
Copy file name to clipboardexpand all lines: TRANSLATING.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ If there is no project for your language, you can start your own translation.
59
59
Base your work on the second edition of the book, available [here](https://github.com/progit/progit2). To do so:
60
60
1. Pick the correct [ISO 639 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for your language.
61
61
1. Create a [GitHub organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/creating-a-new-organization-from-scratch), for example: `progit2-[your code]` on GitHub.
62
-
1. Create a project ``progit2``.
62
+
1. Create a project `progit2`.
63
63
1. Copy the structure of progit/progit2 (this project) in your project and start translating.
Copy file name to clipboardexpand all lines: book/01-introduction/sections/about-version-control.asc
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
=== About Version Control
2
2
3
3
(((version control)))
4
-
What is ``version control'', and why should you care?
4
+
What is "`version control`", and why should you care?
5
5
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.
6
6
For the examples in this book, you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
Vim, Emacs and Notepad++ are popular text editors often used by developers on Unix-based systems like Linux and macOS or a Windows system.
78
-
If you are using another editor, or a 32-bit version, please find specific instructions for how to set up your favorite editor with Git in <<C-git-commands#_core_editor>>.
78
+
If you are using another editor, or a 32-bit version, please find specific instructions for how to set up your favorite editor with Git in <<C-git-commands#ch_core_editor>>.
Copy file name to clipboardexpand all lines: book/01-introduction/sections/help.asc
+1-1
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ These commands are nice because you can access them anywhere, even offline.
21
21
If the manpages and this book aren't enough and you need in-person help, you can try the `#git` or `#github` channel on the Freenode IRC server, which can be found at https://freenode.net[].
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
-
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:
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/02-git-basics/sections/recording-changes.asc
+6-6
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Untracked files:
53
53
nothing added to commit but untracked files present (use "git add" to track)
54
54
----
55
55
56
-
You can see that your new `README` file is untracked, because it's under the ``Untracked files'' heading in your status output.
56
+
You can see that your new `README` file is untracked, because it's under the "`Untracked files`" heading in your status output.
57
57
Untracked basically means that Git sees a file you didn't have in the previous snapshot (commit); Git won't start including it in your commit snapshots until you explicitly tell it to do so.
58
58
It does this so you don't accidentally begin including generated binary files or other files that you did not mean to include.
59
59
You do want to start including `README`, so let's start tracking the file.
@@ -83,7 +83,7 @@ Changes to be committed:
83
83
84
84
----
85
85
86
-
You can tell that it's staged because it's under the ``Changes to be committed'' heading.
86
+
You can tell that it's staged because it's under the "`Changes to be committed`" heading.
87
87
If you commit at this point, the version of the file at the time you ran `git add` is what will be in the subsequent historical snapshot.
88
88
You may recall that when you ran `git init` earlier, you then ran `git add <files>` -- that was to begin tracking files in your directory.(((git commands, init)))(((git commands, add)))
89
89
The `git add` command takes a path name for either a file or a directory; if it's a directory, the command adds all the files in that directory recursively.
@@ -111,10 +111,10 @@ Changes not staged for commit:
111
111
112
112
----
113
113
114
-
The `CONTRIBUTING.md` file appears under a section named ``Changes not staged for commit'' -- which means that a file that is tracked has been modified in the working directory but not yet staged.
114
+
The `CONTRIBUTING.md` file appears under a section named "`Changes not staged for commit`" -- which means that a file that is tracked has been modified in the working directory but not yet staged.
115
115
To stage it, you run the `git add` command.
116
116
`git add` is a multipurpose command -- you use it to begin tracking new files, to stage files, and to do other things like marking merge-conflicted files as resolved.
117
-
It may be helpful to think of it more as ``add precisely this content to the next commit'' rather than ``add this file to the project''.(((git commands, add)))
117
+
It may be helpful to think of it more as "`add precisely this content to the next commit`" rather than "`add this file to the project`".(((git commands, add)))
118
118
Let's run `git add` now to stage the `CONTRIBUTING.md` file, and then run `git status` again:
119
119
120
120
[source,console]
@@ -212,7 +212,7 @@ $ cat .gitignore
212
212
*~
213
213
----
214
214
215
-
The first line tells Git to ignore any files ending in ``.o'' or ``.a'' -- object and archive files that may be the product of building your code.
215
+
The first line tells Git to ignore any files ending in "`.o`" or "`.a`" -- object and archive files that may be the product of building your code.
216
216
The second line tells Git to ignore all files whose names end with a tilde (`~`), which is used by many text editors such as Emacs to mark temporary files.
217
217
You may also include a log, tmp, or pid directory; automatically generated documentation; and so on.
218
218
Setting up a `.gitignore` file for your new repository before you get going is generally a good idea so you don't accidentally commit files that you really don't want in your Git repository.
@@ -509,7 +509,7 @@ This is convenient, but be careful; sometimes this flag will cause you to includ
509
509
To remove a file from Git, you have to remove it from your tracked files (more accurately, remove it from your staging area) and then commit.
510
510
The `git rm` command does that, and also removes the file from your working directory so you don't see it as an untracked file the next time around.
511
511
512
-
If you simply remove the file from your working directory, it shows up under the ``Changes not staged for commit'' (that is, _unstaged_) area of your `git status` output:
512
+
If you simply remove the file from your working directory, it shows up under the "`Changes not staged for commit`" (that is, _unstaged_) area of your `git status` output:
Copy file name to clipboardexpand all lines: book/02-git-basics/sections/remotes.asc
+3-3
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ In this section, we'll cover some of these remote-management skills.
11
11
[NOTE]
12
12
.Remote repositories can be on your local machine.
13
13
====
14
-
It is entirely possible that you can be working with a ``remote'' repository that is, in fact, on the same host you are.
15
-
The word ``remote'' does not necessarily imply that the repository is somewhere else on the network or Internet, only that it is elsewhere.
14
+
It is entirely possible that you can be working with a "`remote`" repository that is, in fact, on the same host you are.
15
+
The word "`remote`" does not necessarily imply that the repository is somewhere else on the network or Internet, only that it is elsewhere.
16
16
Working with such a remote repository would still involve all the standard pushing, pulling and fetching operations as with any other remote.
17
17
====
18
18
@@ -118,7 +118,7 @@ $ git fetch <remote>
118
118
The command goes out to that remote project and pulls down all the data from that remote project that you don't have yet.
119
119
After you do this, you should have references to all the branches from that remote, which you can merge in or inspect at any time.
120
120
121
-
If you clone a repository, the command automatically adds that remote repository under the name ``origin''.
121
+
If you clone a repository, the command automatically adds that remote repository under the name "`origin`".
122
122
So, `git fetch origin` fetches any new work that has been pushed to that server since you cloned (or last fetched from) it.
123
123
It's important to note that the `git fetch` command only downloads the data to your local repository -- it doesn't automatically merge it with any of your work or modify what you're currently working on.
124
124
You have to merge it manually into your work when you're ready.
If you want to view the versions of files a tag is pointing to, you can do a `git checkout` of that tag, although this puts your repository in ``detached HEAD'' state, which has some ill side effects:
261
+
If you want to view the versions of files a tag is pointing to, you can do a `git checkout` of that tag, although this puts your repository in "`detached HEAD`" state, which has some ill side effects:
262
262
263
263
[source,console]
264
264
----
@@ -287,7 +287,7 @@ Previous HEAD position was 99ada87... Merge pull request #89 from schacon/append
287
287
HEAD is now at df3f601... Add atlas.json and cover image
288
288
----
289
289
290
-
In ``detached HEAD'' state, if you make changes and then create a commit, the tag will stay the same, but your new commit won't belong to any branch and will be unreachable, except by the exact commit hash.
290
+
In "`detached HEAD`" state, if you make changes and then create a commit, the tag will stay the same, but your new commit won't belong to any branch and will be unreachable, except by the exact commit hash.
291
291
Thus, if you need to make changes -- say you're fixing a bug on an older version, for instance -- you will generally want to create a branch:
Copy file name to clipboardexpand all lines: book/02-git-basics/sections/undoing.asc
+3-3
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ You end up with a single commit -- the second commit replaces the results of the
36
36
It's important to understand that when you're amending your last commit, you're not so much fixing it as _replacing_ it entirely with a new, improved commit that pushes the old commit out of the way and puts the new commit in its place.
37
37
Effectively, it's as if the previous commit never happened, and it won't show up in your repository history.
38
38
39
-
The obvious value to amending commits is to make minor improvements to your last commit, without cluttering your repository history with commit messages of the form, ``Oops, forgot to add a file'' or ``Darn, fixing a typo in last commit''.
39
+
The obvious value to amending commits is to make minor improvements to your last commit, without cluttering your repository history with commit messages of the form, "`Oops, forgot to add a file`" or "`Darn, fixing a typo in last commit`".
40
40
====
41
41
42
42
[NOTE]
@@ -67,7 +67,7 @@ Changes to be committed:
67
67
modified: CONTRIBUTING.md
68
68
----
69
69
70
-
Right below the ``Changes to be committed'' text, it says use `git reset HEAD <file>...` to unstage.
70
+
Right below the "`Changes to be committed`" text, it says use `git reset HEAD <file>...` to unstage.
71
71
So, let's use that advice to unstage the `CONTRIBUTING.md` file:
72
72
73
73
[source,console]
@@ -176,7 +176,7 @@ Changes to be committed:
176
176
177
177
----
178
178
179
-
Right below the ``Changes to be committed'' text, it says use `git restore --staged <file>...` to unstage.
179
+
Right below the "`Changes to be committed`" text, it says use `git restore --staged <file>...` to unstage.
180
180
So, let's use that advice to unstage the `CONTRIBUTING.md` file:
Copy file name to clipboardexpand all lines: book/02-git-basics/sections/viewing-history.asc
+3-3
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
After you have created several commits, or if you have cloned a repository with an existing commit history, you'll probably want to look back to see what has happened.
5
5
The most basic and powerful tool to do this is the `git log` command.
6
6
7
-
These examples use a very simple project called ``simplegit''.
7
+
These examples use a very simple project called "`simplegit`".
8
8
To get the project, run:
9
9
10
10
[source,console]
@@ -218,7 +218,7 @@ Those are only some simple output-formatting options to `git log` -- there are m
218
218
| `--name-only` | Show the list of files modified after the commit information.
219
219
| `--name-status` | Show the list of files affected with added/modified/deleted information as well.
220
220
| `--abbrev-commit` | Show only the first few characters of the SHA-1 checksum instead of all 40.
221
-
| `--relative-date` | Display the date in a relative format (for example, ``2 weeks ago'') instead of using the full date format.
221
+
| `--relative-date` | Display the date in a relative format (for example, "`2 weeks ago`") instead of using the full date format.
222
222
| `--graph` | Display an ASCII graph of the branch and merge history beside the log output.
223
223
| `--pretty` | Show commits in an alternate format. Option values include oneline, short, full, fuller, and format (where you specify your own format).
224
224
| `--oneline` | Shorthand for `--pretty=oneline --abbrev-commit` used together.
@@ -252,7 +252,7 @@ of the `--grep` patterns; however, adding the `--all-match` option further limit
252
252
just those commits that match _all_ `--grep` patterns.
253
253
====
254
254
255
-
Another really helpful filter is the `-S` option (colloquially referred to as Git's ``pickaxe'' option), which takes a string and shows only those commits that changed the number of occurrences of that string.
255
+
Another really helpful filter is the `-S` option (colloquially referred to as Git's "`pickaxe`" option), which takes a string and shows only those commits that changed the number of occurrences of that string.
256
256
For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call:
Copy file name to clipboardexpand all lines: book/03-git-branching/sections/basic-branching-and-merging.asc
+3-3
Original file line number
Diff line number
Diff line change
@@ -104,9 +104,9 @@ Fast-forward
104
104
1 file changed, 2 insertions(+)
105
105
----
106
106
107
-
You'll notice the phrase ``fast-forward'' in that merge.
107
+
You'll notice the phrase "`fast-forward`" in that merge.
108
108
Because the commit `C4` pointed to by the branch `hotfix` you merged in was directly ahead of the commit `C2` you're on, Git simply moves the pointer forward.
109
-
To phrase that another way, when you try to merge one commit with a commit that can be reached by following the first commit's history, Git simplifies things by moving the pointer forward because there is no divergent work to merge together -- this is called a ``fast-forward.''
109
+
To phrase that another way, when you try to merge one commit with a commit that can be reached by following the first commit's history, Git simplifies things by moving the pointer forward because there is no divergent work to merge together -- this is called a "`fast-forward.`"
110
110
111
111
Your change is now in the snapshot of the commit pointed to by the `master` branch, and you can deploy the fix.
112
112
@@ -265,7 +265,7 @@ Normal merge conflict for 'index.html':
265
265
Hit return to start merge resolution tool (opendiff):
266
266
----
267
267
268
-
If you want to use a merge tool other than the default (Git chose `opendiff` in this case because the command was run on a Mac), you can see all the supported tools listed at the top after ``one of the following tools.''
268
+
If you want to use a merge tool other than the default (Git chose `opendiff` in this case because the command was run on a Mac), you can see all the supported tools listed at the top after "`one of the following tools.`"
0 commit comments