EGit greying out / not showing commit - eclipse

I've been running into a wired problem (which has been described (but not solved) here as well:
I used to develop using PyDev and Egit (recent versions, EGit is 3.0.3) with just a local repository. Everything worked fine, I was able to commit, branch, reverse etc. just using the "Team" menue in my PyDev perspective.
Now I added a remote reposisory to host the project and since then, I can not commit to my local repository. File changes are not detected (even worse: I change file A and afterwards all folders are marked as "changed" (having the ">" icon) and no file is recognized as "needing synchronization". The only menu points which are available are "Add to index" (which has no effect) and "Pull" (which says "everything is up to date" - which is true since there is nothing new on the server to pull).
When I use git (either command line or git extensions), I see the changed file as changed and it's offered for staging. I can use plain git to commit, push, etc, everything works as expected and no error messages are shown. I'm just using one branch (master).
Even if I open the "Git Repository Exploring" perspective in Eclipse and got to the tab "Git Staging", the file is listed.
I jus started a new test project with just a local repository (residing in the same git-folder ~/git) and here I can commit as I'm used to... And I added the project to the same repository server - and still everthing works! I can commit, I can push, everything is fine there...
yes, I can work around hat by using git extensions, but I really liked the smooth integraion of git in eclipse. Therefore, all ideas, remarks etc. are very welcome! And yes, I tried restarting eclipse ;o).

Finally!!!
Since everything was working before I added the remote host, amd everything worked in my small toy project, I removed and re-added my remote host using gut bash:
git remote remove origin
git remote add origin git#my_servername:my_repository.git
I suppose some configuration files were corrupted in a very non-obvious way (I checked all config fiels and did not notice anything...)

Sounds like a bug, and you might be able to get it back to a good state by playing around with the plugin setting data.
Located here: ${workspace}/.metadata/.plugins
I highly recommend backing up that whole folder before you start playing around. I have had other eclipse issues that have been resolved by going in here and deleting things.

Related

STS getting this while pull/fetch latest changes Couldn't lock local tracking ref for update

Getting this issue in spring tool suit while fetching/pull latest changes from remote branch. i don't have git bash on my local previously it was working fine right now i am getting below mention issue.
Couldn't lock local tracking ref for update
I also encountered same problem
But I removed this problem using GITHUB Desktop tool.
Once I executed pull from STS, its showed the dialog box with error as shown above. and a up arrow got appended showing there are some commit to be pushed,
though I had not made any commits before this pull. The changes from pull were not added to my local project.
I checked on Github Desktop, and it also showed same arrow.
I pushed it from tool, and it was resolved. The changes from pull got added to local project.
While you don't have git bash, Eclipse is using its own JGit (java-based implementation of Git)
As recommended in "egit lock fail eclipse", do check if you have any "<refname>.lock" file under .git/refs/". (howlger refers to eclipse issue 417860:
I checked in jgit and egit sources and found that the only occurrence of the text "[lock fail]" is used when fetch fails to update a remote tracking branch.
This can happen if a previous crash didn't cleanup a "<refname>.lock" file which git creates as a lock to guard the ref against concurrent updates.
git remote prune origin
solved same problem for me

Eclipse Team Synchronize shows Outgoing changes in 'Java Workspace' Model, where Git Model shows none

I've looked at the answers to similar questions here, and none fit the bill, or manage to solve the issue.
Using Eclipse Neon.3 (4.6.3) with EGit 4.7.0, and no other versioning system like SVN or CVS, calling Team > Synchronize on some of my Java projects, which have been synced with a Bitbucket repo many times over, and which show absolutely no changes whatsoever in the compare editor, including any whitespace differences, Eclipse still lists several .java source files as Outgoing changes under the "Java Workspace" model.
So for instance, calling Team > Synchronize on a project in my workspace, that is tracked in my local Git repo and remotely in a Cloud hosted Bitbucket, returns the following message:
There are no more Incoming/Outgoing changes for Git Commits. However Java Workspace has changes in Incoming/Outgoing mode.
Change to Java Workspace
Show All Models
A Google search for "However Java Workspace has changes" only yields a single result:
The sole hit is a reported bug in Subversive (one of the two main SVN integrations for Eclipse). However, while the described issue sounds like a rather accurate match of the issue I'm having, it claims that doing another Team > Synchronize, or restarting Eclipse would resolve the phantom Outgoing changes. Not so in my case, not with EGit.
Like I said, the remote and local files are exactly the same, incl. their whitespace/line endings.
Fetch/Pull from origin says there are no changes, everything is up to date.
Calling Replace With > HEAD Revision also doesn't help, Eclipse keeps insisting, that my workspace has Outgoing changes. Outgoing where?
This is obviously no big issue, merely an irritating nuissance. Still would be nice to get to the bottom of it.
...Did you try doing the Eclipse dance?
Edit: I find after some time Eclipse will behave strangely (example: dumping views I have enabled, losing track of files, or behaviour similar to what you are experiencing). When this happens I usually select and delete the project from my workspace, close Eclipse, reopen it and reopen the project.
I don't know why this happens or why this works as a fix.

Eclipse EGit, working with forked project. Getting updates from the original project

Hello everybody I have this "big" and frustrating problem,
I have forked a project from git and as usual it is available in my account in GitHub. I then set up a project in eclipse selecting from an existing URI. All is ok, if I work with my own version of the project.
What I want to do is, because the project is changing and growing day by day, to have an updated copy from the original project and, every time I want to download any change I would like that the download is from the original project.
At the moment the only way (with EXTREMELY big problems) I found is using "Team > Fetch from Upstream" the changing the link to the repos using the "config" button. Obviously this lead to conflicts and annoying problems. I am sure that this is not the correct way to handle a forked repos and I need help.
I am using windows 7 and eclipse with egit, if I press Windows-R and then cmd it don't recognize the command "git" so I can't use console commands.
Any help?
With windows 7, you can install git to your machine and use console command as normal. (Link to download)
See this link to configure git to sync your fork with the original repo.
Hope this can help.

Why does Eclipse show a Git repo for a Working Set?

Whenever I open a project in Eclipse (4.2.1) that is connected to a Git repo, the Git repo description [Name branch] is displayed by the Working Set that project is in.
Example:
If I close the TestSlide project (that has the repo of the same name), the [TestSlide master] will be gone. And when I open another Git-connected project, then its repo name/branch will be printed beside the Working Set.
And when there are several Git-connected projects opened in the Working Set (all coincidentally pointing to master branch), this is shown:
Even though there are several projects in the same Working Set that are connected to SVN repos, never are their repo names shown beside the Working Set name.
Somehow I believe this is not intended (by Eclipse), so is it something I "misconfigured" in Eclipse so I can fix it to get rid of this annoyance?

Eclipse Subversive plugin: Why can't I create this branch?

I recently switched from Subclipse to Subversive for SVN integration in Eclipse, and I'm having trouble creating a branch of my source code.
I've tried a few different variations of my method, but they all led me to the same roadblock. Basically, here's what I'm trying to do.
Navigator pane
Right-click on project folder (want to branch the whole thing)
Team > Branch
In the Location field, browse to select the /branches folder in my repository
Add the branch name to the path field, i.e. "/testbranch" (not pictured)
The dialog then looks like this, and I can't continue.
http://img820.imageshack.us/img820/1011/branchingfail.png
What am I doing wrong here? Why can't I create this branch? If nothing else, can it at least be confirmed that I'm following the right process, and it's something about my environment or configuration that's stopping the branch from being created?
I found that SVN is very particular with the SVN connectors. If you connected and downloaded SVN code with one connector and then switched to a different connector when you started using Subversive, you'll definitely have problems.
I've had unexplained Subversive problems in the past and they've almost always tracked back to different connector usage. The solution for me was to reset all of my local SVN code. I deleted everything local and rechecked out all of my code. Everything appeared to be fine after that.
I hope this helps.
I don't consider this a proper solution, but it's at least got me working again. Instead of running a branch operation, I created a new folder inside my branches folder, and then copied the contents of the trunk folder into it. I was then able to switch to my new "branch".
Make sure you do not have any uncommited changes, and then do a Team>cleanup. Also make sure you are branching from the trunk and that you do not have any mixed version. For example you can have a folder below the root be from another branch while the rest of the project is from trunk. This will cause the branch creation to fail. When having issues with branches from the navigator, try reverting the project (right click choose team>revert) several times. Then execute the cleanup several times.
Also you may consider creating the branch from the SVN Repositories view. From this view right click on the location you want to branch from (ie truck) and select New>branch from the context menu. One last step is from the navigator view you will need to swtich your project to the newly created brancn: right click on the project root and select Team>switch from the context menu