将本地EGit存储库导出到本地GitStack存储库

3
我在电脑上安装了GitStack,以便能够在各种机器上构建我的应用程序。我的Eclipse项目有一个本地git存储库,但我无法弄清如何将两者连接起来。
“Team > Remote > Push”和“Team > Push to Upstream”不可用(灰色)。
我已经配置了以下内容,并阅读了此教程
  • 在Eclipse中设置了Git用户名和电子邮件。
  • 我在Gitstack中添加了用户和存储库。
我还尝试单击我的本地git存储库并执行“粘贴存储库路径或URI”,我设法连接到本地主机上的GitStack存储库,尽管它显然是空的。我想这就是我在其他计算机上同步东西所必须做的事情?
我该如何将两者连接起来?

这是我的命令行尝试(注意:我使用的是Cygwin):

[~/eclipse/JfxMCApp]> git.exe remote add jfxmcapp.gitstack.local http://localhost/JfxMCApp.git

[~/eclipse/JfxMCApp]> git.exe remote -v
jfxmcapp.gitstack.local http://localhost/JfxMCApp.git (fetch)
jfxmcapp.gitstack.local http://localhost/JfxMCApp.git (push)

[~/eclipse/JfxMCApp]> git.exe push jfxmcapp.gitstack.local
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

这之后 Git 就会卡住很久?

更新:在添加git remote add之后,它出现在eclipse中。

1个回答

0

首先:尝试使用git命令行客户端。Git非常强大,但也很难懂 - 如果你把它藏在GUI后面,它不会告诉你任何秘密。

关于你的问题:现在你已经将gitstack repo设置为远程仓库,你需要做的就是推送。如果上游选项不可用,请尝试从命令行中执行:运行git shell,进入你的项目目录并运行git push


好的,在命令行中添加了repo之后,它出现在Eclipse中了,谢谢。 - Dreen

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接