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

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.

Related

EGit wants to archive Eclipse project data and other inappropriate files

OK, I admit that I must have screwed up when I started using EGit. I started using Eclipse Galileo as a welcome alternative to Notepad edit and command-line compilation. Somewhat later I discovered that Git was integrated into Eclipse, and happily started using it.
I do not remember all the details, but it seems that I made an initial mistake that has been carried on from one computer to another and one Eclipse upgrade to another.
I have consistently tried to specify that source files are in project subdirectory src and their products are in project subdirectory bin. Git wants to archive anything in bin, as well as project metadata at the same directory level.
In the past I have been so mono-focused on the project that I just sprinkled gitignore files everywhere and clicked on "Ignore" when preparing a commit. But now that the project has been brought to a dead halt due to problems in Eclipse Kepler I have resolved to try to disentangle the mess while upgrading to Eclipse Luna.
As I see it, there are three alternatives: (1) Figure out a way to separate the various directories, (2) Brute force copy-and-paste the 300 some-odd source files into a new, clean directory structure (complicated by the fact that there are currently four open Git branches and several uncommitted changes) or (3) copy the current mess and continue to deal with extraneous "changed" files.
Alternative number one is of course the most desired.
Any suggestions?
(Later)
Please be patient with me. I am a newby in this venue. But quite experienced in other venues, where I learned to search for similar questions before posting.
I did try to search for similar problems, to no avail. I also noticed that, while composing my question, there appeared a list of other questions that might be related. None seemed applicable, so I ignored it. When I came back to see if there were any answers, there was the list again and this time I found Eclipse + EGit: clone project into workspace. Perhaps it was there at the top of the list when I finished composing. I'll know to look next time.
I tried the first recommendation, cloning via EGit from the current location to a new one. It seemed to work okay, but there are a couple of things missing: Only the specified branch is available (not MASTER) and the extensive history for the last three years is reduced to one entry dated at the time of cloning.
Fortunately, the other three branches (including MASTER) are not currently divergent. If necessary, I can manually create them again - if there is some way to recover or display the complete history in the clone.
I was not surprised to see that the several unstaged changes in the source were not present. I can deal with those manually, but I wonder if it would help if I staged them before my next attempt to clone?
(Staging those changes may or may not be possible. I became very frustrated with problems using Eclipse Kepler and gave up trying to do anything more to resolve the problems several months ago. I did not document the problems, and by now have forgotten what they were. I have a vague memory of trying to commit current changes and running into fatal errors.)
Now I think I have a more focused question - or rather several questions:
(1) When upgrading Eclipse to a new version, is EGit cloning the easiest way to continue an existing project on the same disk? Should I just copy the original directory? Should I first clone to GitHub and then clone back to the disk from there?
(2) Should I attempt to stage the uncommitted changes before cloning?
(3) Why is Git history reduced to one entry? Would it help if I let MASTER be the default branch and then what? Check out the current (rather lengthy) branch? Or something else?
(4) What should I do about .project, .settings and other configuration files? Is it okay to copy them into the new directory structure in the desired places? Or should I make note of all settings and reconstruct them in Eclipse Luna?

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 are my changesets removed if I close a project?

In Eclipse, I regularly close (rightclick on project -> close project) a subset of my projects for varying reasons.
I noticed that if there are changes in the closed project that are assigned to a given changeset, the changes become "< Unassigned >" when I open the project again.
This is extremely frustrating since it basically leaves me the following two options:
never ever close a project with changes assigned to a changeset
re-assign all changes in the project to the desired changeset after having re-opened the project
Why is this the case?
Is there a way around this?
Versions: Eclipse 4.3.1, Subversive SVN Team Provider 1.1.1.I20130816-1700
you closed your project in eclipse, but, I am guessing your eclipse project is connected from your laptop to svn server. if so, you need to close repo for commits in svn - that will close your project in real.
there is an access file on svn server side - remove access for whoever you want to be cut off.
or... make it read-only access - they will be able to see the project, but won't be able to commit to it.

EGit greying out / not showing commit

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.

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