Question

I've set up GitStack on my computer in order to be able to make builds of my application on various machines. My Eclipse project has a local git repo but I can't figure out how to connect the two.

The Team > Remote > Push and Team > Push to Upstream are unavailable (grey).

I've configured the following things and read this tutorial:

  • Git user name and email in Eclipse.
  • I've added a user and a repo in Gitstack.

I've also tried to click on my local git repo and do Paste Repository Path or URI and I manage to connect to my GitStack repo on localhost though its obviously empty. I suppose this is what I have to do on other machines to sync stuff?

How do I connect the two?


Here are my command line attempts (note: im using 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)

After this Git just hangs for ages?


Update: it appeared in eclipse after adding it git remote add

Was it helpful?

Solution

First: try to use the git command-line client. Git is powerful and evil – and will not tell you any of it’s secrets if you hide it away behind GUIs.

About your question: Now that you set up your gitstack repo as a remote, all you need to do is push. If the push to upstream options are not available, try doing it from the command line: Run the git shell, go to your project dir and run git push.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top