将新的Eclipse项目与GitHub存储库同步

问题描述 投票:1回答:1

我在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项目中。我该如何实现?

eclipse git github ejb
1个回答
0
投票

评论如下:

© www.soinside.com 2019 - 2024. All rights reserved.