开发者

How to synchronize configuration between git setups?

开发者 https://www.devze.com 2022-12-18 00:44 出处:网络
I\'m new to git, and I\'m doubting how ca开发者_JAVA百科n I synchronize config files between developers.

I'm new to git, and I'm doubting how ca开发者_JAVA百科n I synchronize config files between developers.

Let's say I want all developers to have core.autocrlf set to true, or the same commit template, how can I do it?

Any idea?

Thanks!


There is no such guarantee in a DVCS (as in "Distributed"), since local settings beat global settings.

But in a closed environment (where the population of developers have accessed to a common and shared set of resources), you can:

  • encapsulate the git init process (to use a template, for common settings)
  • Force the GIT_CONFIG environment variable to a shared read-only file (on Linux, accessed through Samba from Windows users), to force all config settings to be read from there.

This is not a full-proofed solution, but it can get you started.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号