EGit does not commit - eclipse

I had a Scala project, synchronized with GitHub. Then I had to reinstall my OS. I installed Eclipse and EGit, then imported the project from the remote location.
Now, when I make changes to the project, commit does nothing. It does not open the dialog which lets me enter a message and select files to commit. The files are still displayed as changed in the package explorer. I read somewhere that EGit logs errors to stdout, but when I start Eclipse from the command line, I see no errors logged.
If I try to push, I get asked for the passphrase for my ssh keys, and there is a window with a progress bar, but then the content of the remote repository does not change.
I am quite new to Git and don't know where to go further to diagnose the problem. What I did was to get into the Eclipse preferences and restore the defaults on preferences windows in the Git group. This didn't help.
One thing which I noticed is that the project itself is in the git directory, so when I make changes to the code and save, they get written there, not under the workspace directory of Eclipse. I don't know if this is relevant (maybe it can't write the changes to the local repository because there is no local repository copy to be updated?), but I didn't see a setting to change this location when I imported the project.
What can I do to troubleshoot this problem?

Related

EGit in eclipse not detecting changes in a JAR file

I am using git to check in codes from eclipse and my project uses "SparkChat.jar" for it's chat feature. I modified the code for sparkchat a little and generated an updated SparkChat.jar, but when i tried checking in, git doesn't recognize that SparkChat.jar has been modified.
Is there anyway i can 'tell' git that SparkChat.jar is dirty and needs to be checked in?
Edit: To clarify, i am using EGit implementation in Java Eclipse, not command line.
Hit the Refresh button in the toolbar of the Git Staging or Git Repositories view to synchronize Eclipse with the changed files of the file system:
If it is a file in a project, a Refresh (F5) in the Project Explorer or Package Explorer should also work.
It seems, there is a bug (or intended "feature"?!?). You have to close and reopen Eclipse! :-( That's the only way with my Eclipse to see file system changes in the 'Git Repositories' Windows! :-((

Eclipse keep asking about SVN credentials

I have tried to move SVN project to Git.
I have created a remote REPO and pushed my project there.
Whenever I open Eclipse Europa I keep getting a message about SVN credentials and I can't get rid of it; after the Cancel button is pressed, the same window appear again.
How to get rig of the nasty window?
I have deleted hidden .svn folders and tried steps suggested in this article:
http://www.thinkplexx.com/learn/howto/ide/eclipse/fix-eclipse-svn-always-asking-for-login-and-password-clear-keyring-or-cache
Create a new workspace (e. g. by using the command line argument -data) and import your project(s) from the old into the new workspace.

Recover GIT delete Eclipse

I was trying to add bitbucket to my [existing] project on eclipse so I can commit it and have a GIT to work on, but I screwed up. In my GIT Repository Exploring there were 2 cloned project (the same) so I smartly deleted it to import again. The problem is, in my computer, the local folder with the project got deleted. I need to get my files back (as it was before trying to GIT it). Is there anyway I can do it? I'm desperate, since I've backed up 2 weeks ago and I have modified it a lot !
If Eclipse still has the project you can right click on the project and select Restore from Local History.... Eclipse will show you the files it has saved in its file history cache.

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.

Start using Eclipse GIT with an existing project ... project files get moved

Yesterday I wanted to start using Eclipse eGIT on an existing project following the instructions on http://www.vogella.com/articles/EGit/article.html
This tutorial suggests to have the git repository outside of the workspace, and I followed this suggestion.
After the step "5.5. Using the Git Staging view for the initial commit" I committed my initial commit. Then I continued editing one of my source files that was still open. But when I tried to save my changes, Eclipse complained that the source file was no longer there.
Then I checked both my workspace and git folder, and the project files were only in git. This is mentioned nowhere in the tutorial. Is this normal behavior?
Even more surprising: In order to continue working normally with my already open files, I copied the project subfolder from .git back to the workspace folder. And now everything seems to be fine. My changes are reflected in workspace folder as well as in "Unstaged Changes" in the Git Staging view and in git folder.
Is this expected behavior?
I found out that the files really get moved. I needed to close all the open project files and then open them from package explorer again (which will open the files from git repository).