Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/
34,356
Solution 1
If you did push, you can try and:
- clone again in another folder
- check that it does look like /c/xampp/htdocs/otherfolder (master)
- if it does, rename otherfolder to website, and go on working in that fresh clone
Solution 2
Use rd .git /S/Q
before running the git init
command.
Comments
-
mochadwi almost 2 years
I already made a project there, add, commit, push. Unfotunately, I've got power surgery :'(
When I've tried restart my PC, I
cd
back to my project folder, but suddenly it looks like these:UserName@PC /c/xampp/htdocs/website
before
UserName@PC /c/xampp/htdocs/website (master)
I tried
git init
and this showed up:Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/
but, nothing happen to my repo T__T
it still looks like these:
UserName@PC /c/xampp/htdocs/website
Thank you very much, your guidance please t(^_^)
EDIT: I did
git stash save
before power surgery & this files comes up: -
mochadwi over 9 yearsrecently, I found that my
.git/index
&.git/HEAD
file is corrupted after power surgery :'( Thank you for your advice sir, I though I would do agit clone
but I didn't do much push either before >_< I stash every last my changed files and bam, I didn't remember the last time I did eithergit commit
norgit push
-
VonC over 9 years@MochaD yes, small andfrequents commits are best practice, and would ensure that you don't find yourself in this pickle in the future.
-
mochadwi over 9 yearsyeah sir, I made much commit and try to minimize my doing. And try
git stash
to compare other branch much quicker, without have tocommit
first, or even twicecommit
with a tiny little changes ;'( I should try to search about this corruption, maybe I can find some solution! @VonC thank you very much sir! -
mochadwi over 9 yearsyet, I can't voted up your answer, I just had this account a month ago :D and still had 12 reputation, because you voted up mine question :D