问题
I shared my project in eclipse, by
Right Click -> Team -> Share. In the wizard: Add the URL, user, password. Advanced -> set master remote and local -> Save and Push.
Then I tested by making some changes, and push, and it was working.
My friend used clone to get the same project. She made some changes, I tried fetch/pull, both of them gives the error: Nothing to fetch. I tried Push, which gives the error: rejected-non fast forward!
My Error Log View:
eclipse.buildId=4.3.2.M20140221-1700
java.version=1.8.0_20-ea
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product
org.eclipse.epp.package.jee.product
Error
Thu Aug 07 10:28:51 EDT 2014
Can't connect to any repository:
https://Andisheh86@bitbucket.org/Andisheh86/semanticsearch.git (Nothing to push.)
Warning
Thu Aug 07 10:57:38 EDT 2014
Keybinding conflicts occurred. They may interfere with normal accelerator operation.
The content of ".git/config"
[core]
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[remote "origin"]
url = https://Andisheh86@bitbucket.org/Andisheh86/semanticsearch.git
push = refs/heads/master:refs/heads/master
[branch "master"]
remote = origin
merge = refs/heads/master
回答1:
It happens to me all the time. I think is because some of bad integration between egit and eclipse. What I do to solve this is open a terminal, go to the directory of your project and do git pull from the console.
The command line will work probably fine. Then, when everything is synchronized, you can go back to your eclipse and start working again from there. In most cases, after doing this eclipse works totally fine.
来源:https://stackoverflow.com/questions/25188014/eclipse-egit-repository-unable-to-push-pull-or-fetch-after-sharing-the-projec