Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit not playing nice with command-line Git?
EGit not playing nice with command-line Git? [message #1230409] Sat, 11 January 2014 23:19 Go to next message
Joe Attardi is currently offline Joe AttardiFriend
Messages: 3
Registered: January 2014
Junior Member
Hi all,

I am using EGit 3.0.0.20130610825-r and am having a strange problem with my Git repository. I can commit changes to my repo using EGit and everything works. But if I then go to a command line, and run "git status" (git version 1.7.9) in the same repo, all my files show as modified still. I checked the git log and verified that my previous commit was, in fact, in the repo.

Thinking this was a one-off weird occurrence, I then committed all the "modified" files from the command line. But when I switched back to Eclipse, now EGit says all the files were modified.

Is there some version clash between EGit and command-line Git? Has anyone else run into this problem?

Thanks!
Re: EGit not playing nice with command-line Git? [message #1230751 is a reply to message #1230409] Mon, 13 January 2014 01:18 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Hard to know what your problem is without more details...

Can you update to a newer version of EGit? 3.2 is out now:
http://eclipse.org/egit/download/
Re: EGit not playing nice with command-line Git? [message #1230828 is a reply to message #1230751] Mon, 13 January 2014 07:12 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Maybe EGit and native Git see a different git configuration. Check if the git configuration shown in EGit
is looking at the same files as native git (Team > Preferences > Configuration).
Re: EGit not playing nice with command-line Git? [message #1231407 is a reply to message #1230409] Tue, 14 January 2014 15:57 Go to previous messageGo to next message
Joe Attardi is currently offline Joe AttardiFriend
Messages: 3
Registered: January 2014
Junior Member
I tried upgrading to EGit 3.2 per Chris's suggestion, and double-checked the Git configuration per Matthias's suggestion. Unfortunately that didn't solve the problem.

What's weird is that it's not just the files that I committed in EGit that show up as uncommitted in command-line Git - as far as I can tell, it's my entire repo.
Re: EGit not playing nice with command-line Git? [message #1231604 is a reply to message #1230409] Wed, 15 January 2014 03:10 Go to previous messageGo to next message
Joe Attardi is currently offline Joe AttardiFriend
Messages: 3
Registered: January 2014
Junior Member
OK, I think EGit is off the hook on this one. I installed TortoiseGit, and its status is consistent with that of EGit. Looks like my command-line Git is to blame.

Thanks for the assistance.
Re: EGit not playing nice with command-line Git? [message #1232425 is a reply to message #1231604] Thu, 16 January 2014 23:06 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Joe Attardi skrev 2014-01-15 04.10:
> OK, I think EGit is off the hook on this one. I installed TortoiseGit, and its status is consistent with that of EGit. Looks like my command-line Git is to blame.
> Thanks for the assistance.

The reason may be that git looks for what is called the system-wide configuration file, which isn't
system-wide, but installation-wide. So it may reside in in /etc/gitconfig or /usr/local/git/etc/gitconfig
or wherver git is installed. On Windows this file contains the default setting for core.autocrlf so it
is vital that the right file is used.

We have to guess and sometimes we get it right. You can tell EGit which location to use if it's wrong.

-- robin
Re: EGit not playing nice with command-line Git? [message #1723344 is a reply to message #1230409] Sun, 14 February 2016 21:44 Go to previous message
Oliver Tseng is currently offline Oliver TsengFriend
Messages: 1
Registered: February 2016
Junior Member
I was having the same problem on my Windows computer with Eclipse and Cygwin.

If I made committed in Eclipse, then it'd show files were modified in cygwin. If I committed in cygwin, it'd show files were modified in Eclipse.

I resolved the problem by running:
git config --global core.fileMode false

Previous Topic:git clone - what exactly is it doing behind the scenes?
Next Topic:Clone Repo with ssh + privatekey
Goto Forum:
  


Current Time: Fri Apr 19 20:18:55 GMT 2024

Powered by FUDForum. Page generated in 0.02957 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top