Set up a default directory structure on git init

The behavior you’re seeing is the expected git behavior:

If you read the manual correctly about the template directory:

TEMPLATE DIRECTORY

The template directory contains files and
directories that will be copied to the $GIT_DIR after it is created.

The files which are copied from the template directory are placed in your GIT_DIR which defaults to the .git directory under your repo’s root directory.

git init does not support templates for the work-tree as far as I know. If this behavior is required, you should be able to get away with writing some simple bash aliases or functions to do this for you.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)