git - 设置自定义 git 配置文件位置
问题描述
我正在使用 Linux (Tcsh) 并且我正在尝试设置一个自定义文件,该文件不会位于将通过以下命令访问的主目录中:
git config --global user.name <user-name>
它在我无法修改的脚本中。
我正在尝试在不更改环境变量的情况下做到这一点$HOME
。换句话说,类似:
touch mygitconfigfile
./my-script-i-cant-edit
cat mygitconfigfile #has user.name config line
可能吗?
解决方案
执行
git config --edit --global
并添加行
[include]
path = ~/someotherfile
推荐阅读
- prestashop - Prestashop - 调用类别 api 导致错误
- java - 同时添加和删除多个对象的 REST 设计最佳实践
- forge - 将保存的视图从 navisworks 加载到 forge
- windows - 如何使用 PowerShell 查找不同语言的 wifi 适配器
- python - a!b!=a!+b!+c! 使用 python 查找 a,b&c
- awk - 如何让 awk 从文件的第二行打印字段?
- oracle - Oracle AQ 使数组出队
- php - php发送带有图像错误的电子邮件
- java - 在 Java8 集合中如何映射来存储重复的键和不同的值
- r - 在 shinydashboard::box 中格式化 helpText