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
+30-7Lines changed: 30 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,26 +279,49 @@ Now, when you run git archive to create a tarball of your project, that director
279
279
280
280
===== `export-subst`
281
281
282
-
Another thing you can do for your archives is some simple keyword substitution.
283
-
Git lets you put the string `$Format:$` in any file with any of the `--pretty=format` formatting shortcodes, many of which you saw in Chapter 2.
284
-
For instance, if you want to include a file named `LAST_COMMIT` in your project, and the last commit date was automatically injected into it when `git archive` ran, you can set up the file like this:
282
+
When exporting files for deployment you can apply `git log`'s formatting and keyword-expansion processing to selected portions of files marked with the
283
+
`export-subst` attribute.
284
+
285
+
For instance, if you want to include a file named `LAST_COMMIT` in your project, and have metadata about the last commit automatically injected into it when `git archive` runs, you can for example set up the file like this:
0 commit comments