重置本地git存储库 [英] Reset local git repository
问题描述
未能同步此分支。
您可能需要打开一个shell并调试此回购的状态。
不会发生。
更好的主意是我在github上删除了存储库,并从本地存储库重新开始。我知道如何删除github上的仓库(我知道这很容易,因为我已经做过一次)。我不知道如何从本地重新开始。是否有一个git命令,基本上是git uninit或git deconstruct repository? 解决方案
在隐藏的 .git
文件夹中的仓库根目录下。简单地删除该文件夹, rm -rf .git
,就好像从未有过回购。
A few days ago I created a repository on Github, then followed the steps to add my existing solution to it. I have no idea what I did wrong, but after a few random 'git add' commands and whatnot, I now get the message in github for windows:
failed to sync this branch.
You might need to open a shell and debug the state of this repo.
Not gonna happen.
A better idea is that I delete the repository at github and start over with my local repository. I know how to delete the repository on github (I know it is easy because I have already done this once.) I am not sure how to start over locally. Is there a git command that is basically "git uninit" or "git deconstruct repository" ?
Git stores everything about a repo at the repo's root in the hidden .git
folder. Simply deleting that folder, rm -rf .git
makes it as if there never was a repo there.
这篇关于重置本地git存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!