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
@@ -333,7 +333,7 @@ This is helpful if a branch in your project has diverged or is specialized, but
333
333
Say you have a database settings file called `database.xml` that is different in two branches, and you want to merge in your other branch without messing up the database file.
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).
Copy file name to clipboardExpand all lines: book/08-customizing-git/sections/policy.asc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ error: failed to push some refs to 'git@gitserver:project.git'
239
239
There are a couple of interesting things here.
240
240
First, you see this where the hook starts running.
241
241
242
-
[source]
242
+
[source,console]
243
243
----
244
244
Enforcing Policies...
245
245
(refs/heads/master) (fb8c72) (c56860)
@@ -250,7 +250,7 @@ Anything your script echoes to `stdout` will be transferred to the client.
250
250
251
251
The next thing you'll notice is the error message.
252
252
253
-
[source]
253
+
[source,console]
254
254
----
255
255
[POLICY] Your message is not formatted correctly
256
256
error: hooks/update exited with error code 1
@@ -260,7 +260,7 @@ error: hook declined to update refs/heads/master
260
260
The first line was printed out by you, the other two were Git telling you that the update script exited non-zero and that is what is declining your push.
0 commit comments