2

I have been using a git repository on my MacBook Pro (OS X Mountain Lion) for several months. Mostly, I've been using the SmartGit client, but also command line. Today, I changed several files and went to SmartGit to commit and push, and SmartGit had "missing" by the repo name.

Using Finder, I confirmed that the working tree folder and subfolders were all in good shape.

On the command line, "ls -a" showed a .gitignore file but no .git folder in the working tree folder.

Tried "git status" and it gave:

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

I do have the same repository on a Windows machine as well, where it's working fine. It's just missing those changed files on the MacBook Pro that hadn't been committed yet.

Suggestions on how to proceed?

4

1 回答 1

8

我建议您git clone将存储库从您的 Windows 机器复制到一个临时目录(复制它也应该这样做),然后将该.git目录移动到您的原始工作目录。

于 2013-02-26T06:05:23.240 回答