And after that I deleted the git init with rm -rf .git
and started a new one with git init
, I messed my project? I want my older git configuration on my project, what can I do now?
Running git init
on an existing project does not do anything bad (it just copies any new templates), as documented in the man page:
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 (or to move the repository to another place if --separate-git-dir is given).
By then running rm -rf .git
, you deleted your own repository (I can't imagine why you expected that command to do anything else). Hope you have backups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With