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?

1
  • I finally just re-cloned the repo from github into an empty folder and moved the few changed files into that folder. Commented Mar 6, 2013 at 6:23

1 Answer 1

8

I suggest you git clone the repository from your Windows machine to a temporary directory (copying it should do as well), and then move the .git directory over to your original working directory.

Sign up to request clarification or add additional context in comments.

1 Comment

stackoverflow.com/a/13852329/6252399 This has a nice example on how to do this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.