我当时正在 Eclipse 中开发一个 Android 项目,然后我决定使用 Git。作为新项目,我最终没有在项目的父项目中创建本地存储库,而是在 C:\Users\Little\.git\LocalRepository
中创建它。 。
现在,我的 Android 项目遇到了很多问题;特别是将用户库添加到我的构建路径中。
基于这里的答案:
Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)
我已将所有用户库导入到我的工作区。但是,我的项目本身位于不同的文件夹中,因此我陷入困境。答案上还有一条评论说:
Thanks. In my case, I forgot that my project was imported from git and was physically located in another folder than all other projects.
我相信我也必须这样做。 如何将项目从本地存储库获取到我的工作区?
最佳答案
下面的命令可能可以帮助某人通过命令行解决相同的问题:
第 1 步:要确保您的 git 不包含任何本地更改,请执行以下操作:
git status
确保这里有您更改过某些内容并且呈红色的文件
第 2 步:检查上次提交的时间和方式:
git log
第 3 步:
rm -rf .git
确保您只进行备份。
第 4 步:将 git clone 到您需要的目录:
git clone ssh://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="37515e45444359565a52195b56444359565a52774f4f194f194f4f194f4f" rel="noreferrer noopener nofollow">[email protected]</a>:xxxxx/project_name
关于android - eGit 将项目移动到其他位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24823072/