tags:

views:

84

answers:

2

I have editor settings that I want to spread in all repositories. If the user defines its own settings, it should erase the repository choices of course.

I want to do that because I have a class and every student clone the repo. Usually they forget to set the core.editor setting and ends up messing around with vi, usually crashing the repo just like if they have cursed magical power.

As it worked for my HOME dir, I tried to use a .gitconfig in my repo dir, like I would set a .gitignore, but it doesn't seem to work.

EDIT :

  • --global DOES let the user set its preference to override the repo, but it DOES'T allow him to fetch the repos config while cloning it.
  • .git/config is not shared among cloned repo
A: 

Global settings can be set via: git config --global

Maybe you should first let the students clone the configuration file (from its own repository) to their home directories.

Alan Haggai Alavi
it does not allow me to share any git configuration.
e-satis
+1  A: 

Distribute your repo using rsync or tar/untar, rather than using "git clone", which as you have seen, does not copy repo-special files.

Randal Schwartz