git - 在存储库中添加 .gitconfig 会覆盖我的全局 .gitconfig 文件配置吗?

标签 git github tfs git-tfs

我将我的项目托管在 TFS-GIT 服务器中。我在 TFS 上遇到 pull 请求 merge 问题。一种选择是更新 TFS 服务器本身上的 git 配置以“merge --no--ff”,因为时间紧迫和其他无法尽快完成的问题。我正在寻找解决此问题的方法

如果我将 .gitconfig 文件添加到存储库并 merge .ff 和 pull.ff 为 false 是否会覆盖在存储库级别应用的配置?那会像git那样工作吗?

任何帮助是极大的赞赏

最佳答案

是的,.gitconfig 中的设置 checkin 特定存储库将覆盖您的全局 .gitconfig设置。

this link :

A .gitconfig file can reside in up to three locations within your filesystem, the location determining the scope in which the file's contents are considered:

  • Global (~/.gitconfig): The most common use, establishes global configuration options for a particular user.
  • System (/etc/.gitconfig): Rarely used, establishes configuration options for the entirety of the local system (all users on this computer).
  • Local: At the repository level, establishes configuration options that only affect this repository. If this file were committed, the settings contained within would impact all users that clone this repository.


也来自 git-scm.com (为清楚起见进行了编辑):

The files are read in order, with (the repository specific .gitconfig) found taking precedence over (other .gitconfig files).

关于git - 在存储库中添加 .gitconfig 会覆盖我的全局 .gitconfig 文件配置吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35616236/

相关文章:

visual-studio-2012 - 从 TFS 2012 打开 SQL 文件时出错

git cherry-pick 在提交消息包含字符串/匹配正则表达式的范围内提交?

Git:如何 rebase 到过去的特定提交?

git - 我如何获取我不拥有的未 merge 的 pull 请求?

git 推送登录失败

git - 由于 Ember 2.* 在创建新项目时使用 Git,我该如何为我的 Web 应用程序开发创建我自己的 Git 存储库?

git - 列出旧提交的文件名

git - 删除所有不再在 Github 上的分支

git - 使用 Git 克隆 TFS 存储库时身份验证失败

tfs - 如何获取 TfvcTemplate.12.xaml 中的内部版本号