If a Git repository already existed in the location in which you ran git init
, the git init
command did nothing.1 In this case it will have printed a message containing the word reinitialized, and you should do nothing.
If git init
did create a repository, all it did was create a .git
directory and populate it with an initial empty database (technically several databases, but you don't need to worry about that yet). The git log
command will show that there are no commits yet (by giving an error, in old version of Git, or by saying "no commits yet" in current versions). In this case, you can simply remove the .git
directory entirely before you do anything else. This will remove the empty Git databases along with the .git
directory (or "folder" if you prefer that term).
1Technically, during a reinitialization, if you've updated your Git version or added or changed your system templates, this might update some of the internal files, including "hooks". But this is quite rare in practice: almost always, a "re-initialization" is just a superficial verification that the repository is in fact a Git repository.