Odd Circumstances lost my whole xcode project from github

时间:2015-10-31 00:15:50

标签: xcode git github

I write this with a heavy heart, Another programmer started a project on my computer. Unbeknownst to me they had set up a git repo for it but had never worked with it much before, had never pushed or synced any of the data. I put in a few weeks work on the project, try to crank it out and assume it is being saved to my hard-drive. I come back and all the files are reverted to when I originally received it from the other programmer. Call up other programmer. Other programmer informs me he deleted the repo to start fresh on his git hub. I'm guessing those files were never saved to my hard drive but have been lost with the Git hub delete? Any ideas || solutions || suggestions?

1 个答案:

答案 0 :(得分:3)

您的项目存储在本地,删除github存储库并不会影响它。

使用git log查看是否有任何提交可以返回。如果有,您可以使用git checkout <commit>切换到该状态。

您还可以检查代码是否在其他分支上。要列出分支,请使用git branch,然后使用git checkout <branch>

切换到该分支

您还可以尝试使用git stash list并查看是否有任何脏工作目录,您可以使用git stash apply <stash>

恢复它