我在Eclipse中有一个与GitHub中的存储库同步的EJB项目,这很好,我在.gitignore
中拥有所有配置文件。
现在我要设置另一台便携式计算机,因此我在Eclipse中创建了一个新的EJB项目(这将创建一些配置文件),并尝试从GitHub中提取新文件。最后,我需要在笔记本电脑中保存所有存储库文件和配置文件。
我初始化了位于本地目录中的Eclipse项目,并尝试了git pull
命令:
git init
git remote add origin https://github.com/xxxx/my-repo
git pull https://github.com/xxxx/my-repo
但是我得到:
From https://github.com/xxxx/my-repo
* branch HEAD -> FETCH_HEAD
fatal: refusing to merge unrelated histories
我只需要将GitHub存储库文件拉到我的Eclipse项目中。我该如何实现?
评论如下:
mvn eclipse:eclipse
以创建蚀配置文件。