for the answer to the post here: Does running git init twice initialize a repository or reinitialize an existing repo? , i understand it is safe and glad that it is so, but can you please explain what these new templates are? do they matter and will they just be additions rather than changes?
2 Answers
The template directory (by default, /usr/share/git-core/templates
) contains files and directories that will be copied to the $GIT_DIR
(by default .git
) after it is created.
It's usually used to share hooks, commit message templates, etc. between all the git projects on the same machine.
The so-called "problem" (read: defined behavior), is that the content of this directory is copied to each project instead of been a symbolic link. So if you update the contents of the template directory (e.g., add another hook), you'd have to git init
your project again to copy it to that project.

- 297,002
- 52
- 306
- 350
Please consider to check this problem similar with git init
command Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/ T__T #HELP
EDIT: However, this problem similar to mine, I've got "index" corruption as well. This post saved me a lot of time.