我将我的项目托管在 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/