问题
I am having my project hosted in TFS-GIT server. I am having an issue with pull request merges on TFS . one option is to update git configs on TFS server itself to make "merges --no--ff" because of time crunch and other issues that cannot be done sooner . I am looking for a workaround for this issue
If i add .gitconfig file to the repository with merge .ff and pull.ff to false will that override configs applied at repository level ? will that work like that with git?
Any help is greatly appreciated
回答1:
Yes, the settings in the .gitconfig
checked into a particular repository will override your global .gitconfig
settings.
See 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.
Also from git-scm.com (edited for clarity):
The files are read in order, with (the repository specific
.gitconfig
) found taking precedence over (other.gitconfig
files).
来源:https://stackoverflow.com/questions/35616236/will-adding-gitconfig-in-repository-override-my-global-gitconfig-file-configur