0

How can i make a persistent git-config file for the whole repository?

I know, that there is a system wide, a user and a repository configuration. What i want is a configuration wich is automatically downloaded with the repository. Something, which acts like .gitignore. .git/config is not an options, since it is locally created.

I'll give you an example:

[branch "master"]
    mergeoptions = --no-ff

With this setting, i achieve that every merge to the master branch is a no-ff merge. This is useful, especially for users which either don't know, or forget to use this option whenever they merge into the master branch. If i store it in .git/config it only stays on my computer.

There are more use cases. I could add something like:

[vim]                                                                                                                                                                                                                              
    settings = tabstop=3 expandtab softtabstop=3 shiftwidth=3

and in my .vimrc (at the end)

let git_settings = system("git config --get vim.settings")
if strlen(git_settings)
   exe "set" git_settings
endif

With this every one using vim has the right tabbing-format, which is especially crucial for python projects.

1 Answer 1

0

Ok, i asked around and there is no such possibility. Actually this behavior is dangerous as remote code execution can be used.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .