将本地Git仓库导出到本地GitStack仓库

时间:2012-12-13 11:58:01

标签: eclipse git version-control egit gitstack

我在我的计算机上设置了GitStack,以便能够在各种计算机上构建我的应用程序。我的Eclipse项目有一个本地git repo,但我无法弄清楚如何连接这两个。

团队>远程>按团队>推送到上游不可用(灰色)。

我已经配置了以下内容和read this tutorial

  • 在Eclipse中使用Git用户名和电子邮件。
  • 我在Gitstack中添加了一个用户和一个回购。

我还尝试点击我的本地git repo并执行粘贴存储库路径或URI ,然后我设法连接到localhost上的我的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 :(得分:0)

首先:尝试使用git命令行客户端。 Git是强大而邪恶的 - 如果你将它隐藏在GUI之后,它不会告诉你任何秘密。

关于您的问题:现在您将gitstack repo设置为远程,您需要做的就是推送。如果推送到上游选项不可用,请尝试从命令行执行此操作:运行git shell,转到项目目录并运行git push