0

Whenever I git clone ...url... I have to spend too much time doing all the git config ...s.

Is there a way through which I can move around all the project specific (I'm aware of the --global flag but that's not what I want to achieve) config on different computers? If yes, what is it.

RinkyPinku
  • 410
  • 3
  • 20
  • 1
    You may create a git repository for your .gitconfig ? See https://stackoverflow.com/questions/8801729/is-it-possible-to-have-different-git-config-for-different-projects to see how to define conditional global configuration. – Gaétan RYCKEBOER Sep 27 '17 at 09:06
  • 1
    What config do you need to clone the repository? – Samuel Robert Sep 27 '17 at 09:07

1 Answers1

0

You can store it inside a project in a file (for example .gitconfig). And than after git clone you would have to simply git config --local include.path <path to gitconfig relative to .git directory>. When you store your config in main dir in repository as .gitconfig then your command should be:

 git config --local include.path ../.gitconfig
barnski
  • 1,642
  • 14
  • 18