I had apparently made a mistake in some code in the original git push from the command line. After about 5 retrys I need help. The code in the program is fixed but when I do
git init
It says
Reinitialized existing Git repository in
What my question is. How do you wipe the memory of the git so that you can redo everything over again and upload it as if the code was there for the first time?
The git init command creates a new Git repository. It can be used to convert an existing, unversioned project to a Git repository or initialize a new, empty repository. Most other Git commands are not available outside of an initialized repository, so this is usually the first command you'll run in a new project.
What happens if I run git init twice? 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.
This sovled the issue. If you had a previous mistake in git and want to delete it then do
rm -rf .git
Then do
git init
To start over
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