Does running git init twice initialize a repository or reinitialize an existing repo?

前端 未结 4 953
傲寒
傲寒 2020-11-27 13:33

What happens to an existing git repository when you issue git init again?

I created a repository with git init. Created a file, add, commi

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 14:07

    From the git docs:

    Running git init in an existing repository is safe. It will not overwrite things that are already there. The primary reason for rerunning git init is to pick up newly added templates.

提交回复
热议问题