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/attributes.asc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ In essence, you want to treat it like a binary file.
24
24
25
25
To tell Git to treat all `pbxproj` files as binary data, add the following line to your `.gitattributes` file:
26
26
27
-
[source]
27
+
[source,ini]
28
28
----
29
29
*.pbxproj binary
30
30
----
@@ -53,7 +53,7 @@ You can't directly compare two versions unless you check them out and scan them
53
53
It turns out you can do this fairly well using Git attributes.
54
54
Put the following line in your `.gitattributes` file:
55
55
56
-
[source]
56
+
[source,ini]
57
57
----
58
58
*.docx diff=word
59
59
----
@@ -193,7 +193,7 @@ image::images/clean.png[The ``clean'' filter is run when files are staged.]
193
193
The original commit message for this feature gives a simple example of running all your C source code through the `indent` program before committing.
194
194
You can set it up by setting the filter attribute in your `.gitattributes` file to filter `*.c` files with the ``indent'' filter:
195
195
196
-
[source]
196
+
[source,ini]
197
197
----
198
198
*.c filter=indent
199
199
----
@@ -271,7 +271,7 @@ If there is a subdirectory or file that you don't want to include in your archiv
271
271
For example, say you have some test files in a `test/` subdirectory, and it doesn't make sense to include them in the tarball export of your project.
272
272
You can add the following line to your Git attributes file:
273
273
274
-
[source]
274
+
[source,ini]
275
275
----
276
276
test/ export-ignore
277
277
----
@@ -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.
0 commit comments