1

Every time you create or clone a git repo, git creates a local .git/config file that you can use to set local project-level git configs that won't be checked in to source. On my version of git (2.17.1), it looks like this:

[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true 

Is it possible to change this default .git/config template?

1 Answer 1

1

You could change it through the git clone [--template=<template_directory>] option.

That option is detailed in git init

Files and directories in the template directory whose name do not start with a dot will be copied to the $GIT_DIR after it is created.

That can include a default config file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.