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/08-customizing-git/sections/config.asc
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Now, no matter what is set as your default shell editor, Git will fire up Emacs
66
66
If you set this to the path of a file on your system, Git will use that file as the default message when you commit.
67
67
For instance, suppose you create a template file at `~/.gitmessage.txt` that looks like this:
68
68
69
-
[source]
69
+
[source,text]
70
70
----
71
71
subject line
72
72
@@ -85,7 +85,7 @@ $ git commit
85
85
86
86
Then, your editor will open to something like this for your placeholder commit message when you commit:
87
87
88
-
[source]
88
+
[source,text]
89
89
----
90
90
subject line
91
91
@@ -150,7 +150,7 @@ If your preferred editor is Emacs or Vim, you know about files that end with a `
150
150
This setting lets you write a kind of global `.gitignore` file.
151
151
If you create a `~/.gitignore_global` file with these contents:
152
152
153
-
[source]
153
+
[source,ini]
154
154
----
155
155
*~
156
156
.DS_Store
@@ -221,7 +221,10 @@ Each of these can be set to `true`, `false`, or `always`:
221
221
In addition, each of these has subsettings you can use to set specific colors for parts of the output, if you want to override each color.
222
222
For example, to set the meta information in your diff output to blue foreground, black background, and bold text, you can run
223
223
224
-
$ git config --global color.diff.meta "blue black bold"
224
+
[source,console]
225
+
----
226
+
$ git config --global color.diff.meta "blue black bold"
227
+
----
225
228
226
229
You can set the color to any of the following values: `normal`, `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, or `white`.
227
230
If you want an attribute like bold in the previous example, you can choose from `bold`, `dim`, `ul` (underline), `blink`, and `reverse` (swap foreground and background).
0 commit comments