Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 1

Sharing git configuration file across different computers working on the same repository

I and my colleagues develop software using git for version control. However, it is pretty difficult that we all use the same --no-ff policy across different types of merges. We know that this can be configured in .git/config for each repo locally or in ~/.gitconfig for all repositories. And we have seen that this configuration file is very powerful allowing use the set different default policies for different branches. However, this file (.git/config) is not something that is pushed to the repository. Therefore, we cannot share these defaults across different working computers by just cloning the repository. Is there a way that this config can be automatically set in the repository? We want this configuration file to work similarly to .gitignore where everybody working with the repo containing the .gitignore has the same ignore policy. I have tested adding a .gitconfig with the desired configuration in the root of the git repository (next to .gitignore) and it did not work.