在 c:/xampp/htdocs/website/.git/ 中重新初始化现有的 Git 存储库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25867686/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 10:23:20  来源:igfitidea点击:

Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/

gitrepositoryinit

提问by mochadwi

I already made a project there, add, commit, push. Unfotunately, I've got power surgery :'(

我已经在那里做了一个项目,添加、提交、推送。不幸的是,我做了动力手术:'(

When I've tried restart my PC, I cdback to my project folder, but suddenly it looks like these:

当我尝试重新启动我的电脑时,我cd回到了我的项目文件夹,但突然看起来像这样:

UserName@PC /c/xampp/htdocs/website

UserName@PC /c/xampp/htdocs/website

before UserName@PC /c/xampp/htdocs/website (master)

UserName@PC /c/xampp/htdocs/website (master)

I tried git initand this showed up:

我试过了git init,这出现了:

Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/

Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/

but, nothing happen to my repo T__T

但是,我的回购 T__T 没有任何反应

it still looks like these: UserName@PC /c/xampp/htdocs/website

它仍然看起来像这样: UserName@PC /c/xampp/htdocs/website

Thank you very much, your guidance please t(^_^)

非常感谢,请多多指教t(^_^)

EDIT: I did git stash savebefore power surgery & this files comes up:

编辑:我git stash save在动力手术之前做过&这个文件出现了:

http://imgur.com/7sGctAg

http://imgur.com/7sGctAg

采纳答案by VonC

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
  • 在另一个文件夹中再次克隆
  • 检查它是否看起来像 /c/xampp/htdocs/otherfolder (master)
  • 如果是,将 otherfolder 重命名为网站,然后继续在该新克隆中工作