git - 我备份了一个git项目,并得到了 "fatal: Not a Git Repository"

标签 git

我将 Linux 上的 git 文件夹备份到 FAT32 外部驱动器上,稍后将其复制回来,它说

fatal: Not a git repository (or any of the parent directories): .git

可能出了什么问题?

最佳答案

要添加到您的答案中,有一个 proposition of a patch back in 2007允许使用像 ' head 这样的名称' 而不是仅 ' HEAD '.

不用说,这个提议并没有受到完全欢迎:

Now, I realise that this might open a can of worms ... would we also want to go looking for files called "pack-ab~1.pac" ?

天哪,不。

所以,直到今天人们仍然在 that happens 时在 HEAD 中重命名头。 .

关于git - 我备份了一个git项目,并得到了 "fatal: Not a Git Repository",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1754108/

相关文章:

git - 为什么当我需要 *pull* origin master 时它说 "Your branch is ahead of origin/master by 857 commits"

windows - Git 子树添加在项目 .gitignore 文件上失败(使用 Windows)

git - 使用 github api 的版本列表

svn - 有没有办法将 "persistently"与 SVN 同步 git 存储库?

git - 中止(意外的和旧的/悬而未决的) rebase 但保留所有更改

ruby-on-rails - 构建期间 dockerized rails 应用程序中的私有(private) Github 存储库

svn - 是否有可能使 git svn dcommit 导致单个 svn 提交?

git 状态在 virtualbox 上的共享文件夹上花费的时间太长

mysql - Git 项目附带的 SQL 数据库引擎

git 发送电子邮件失败 "SSL routines:ssl_choose_client_version:unsupported protocol"