cis*_*eat 18 git configuration
当我创建一个新的git存储库时,一些配置设置会自动添加到.git/config中.我在哪里可以更改这些默认设置?
Von*_*onC 13
考虑以下选项模板git init
:
--template=<template_directory>
Run Code Online (Sandbox Code Playgroud)
提供将使用模板的目录.默认模板目录是
/usr/share/git-core/templates
.指定时,
<template_directory>
用作模板文件的源而不是默认值.
模板文件包括一些目录结构,一些建议"排除模式",以及非执行"钩子"文件的副本.建议的模式和钩子文件都是可修改和可扩展的.
如果你查看用于创建新数据库的git源,你可以在那里包含一个带有默认值的配置文件.
该功能 create_default_files()
确实有:
/* First copy the templates -- we might have the default
* config file there, in which case we would want to read
* from it after installing.
*/
copy_templates(template_path);
Run Code Online (Sandbox Code Playgroud)
该混帐/ config.c有git_default_core_config()
其设置的默认值的功能.