Is it possible to clone git config from remote location?

I confirm a local config (the one within .git/config) is never shared amongst repo
(for various security reasons, like, for instance,:

  • a git alias which would define some commands only valid in your particular environment
    (or git commands themselves: no, as Jan Hudec comments, and as detailed in the question “Is it possible to override git command by git alias?“)
  • some github directive (github.token) supposed to be secret and incorrectly entered in the local config instead of the global one
  • personal config like user.name and user.email (which can be set on a local level if those differs from other repos): that wouldn’t make sense to propagate my name and email when other clone my repo.

  • ).

The closest way to do that would be to version an actual file with the config in it, and invite users to copy it in their .git/config file

Leave a Comment