I'm having the same issue. At first I thought it was me doing something wrong, then it hit me again last night.
I am using a corporate macbook pro I7 (which seems to run slower than my personal 2009 macbook core-2 duo, but i regress...) I was vpn'd into work with Cisco Any connect.
I got to a stopping point, went to commit the files, added my comment and before I hit the commit button, I lost the vpn. No problem I thought as the commit is only to the local repository, but when I hit commit, I got an error saying this is not a git repository. I flipped back to my project and half the files were gone. Luckily the 4 files I had been working in were still there, but I had another project open at the same time, and I lost everything there but the project file. Luckily I had pushed to our git server twice that day, but did lose a little work.
The computer is running McAffee AV.
I'm wondering if it's something to do with the mobile account on the mac.
None of the source code files are in the trash, they just vanish.
I'm storing my projects in ~/Projects/Mobile/Project1... but I have also lost source code in ~/Documents/Projects before.
Zip files in the ~/Projects/Mobile folder are unaffected.
All source code files in MOST all project folders disappear, even projects that were not open in XCode.
Seems that you have problems connecting to github via https.
While I'm not sure what could cause it and how to fix it, you still can use git with another protocol.
Here's the commands to install homebrew in /usr/local/
from scratch using git://
instead of https://
:
cd /usr/local/
git init -q
git remote add origin git://github.com/mxcl/homebrew
git fetch origin master:refs/remotes/origin/master -n
git reset --hard origin/master
That should work. Please notice that if you choose to use another directory for homebrew, you probably will have to append its ./bin
directory to your environment PATH variable for comfortable usage.
Best Answer
~/bin
and update yourPATH