Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » why are some files "staged" other committed ?
why are some files "staged" other committed ? [message #653452] Wed, 09 February 2011 14:57 Go to next message
Eclipse UserFriend
Hello,
I'm new to git Egit (used to cvs/svn) and I want to give my project git version control. I followed the user guide but instead of using a hello work project, I use my own existing one.

The problem is that after "adding" all my files and "committing" them, some of the are marked as committed, other are staged.

I don't understand why.

Here is a screenshot of some of my classes
http://img200.imageshack.us/img200/3598/screenshot20110209at852.png

I'm not actually sure what is the difference between "committed" and "staged"

thanks for your help,
tex

Re: why are some files "staged" other committed ? [message #653476 is a reply to message #653452] Wed, 09 February 2011 15:42 Go to previous messageGo to next message
Eclipse UserFriend
On 09/02/2011 19:57, Tex Twil wrote:
> Hello,
> I'm new to git Egit (used to cvs/svn) and I want to give my project git
> version control. I followed the http://wiki.eclipse.org/EGit/User_Guide
> but instead of using a hello work project, I use my own existing one.
>
> The problem is that after "adding" all my files and "committing" them,
> some of the are marked as committed, other are staged.
>
> I don't understand why.
>
> Here is a screenshot of some of my classes
>
> I'm not actually sure what is the difference between "committed" and
> "staged"
>
> thanks for your help,
> tex
>
>

Are you sure you didn't modify those files and "Add" them again?

Staged = Added to the local index ready to be committed
Committed = Committed to the repo with a comment

Phil
Re: why are some files "staged" other committed ? [message #653478 is a reply to message #653452] Wed, 09 February 2011 16:41 Go to previous messageGo to next message
Eclipse UserFriend
With Git you have 3 stages of a file status. The first is the modified file in your workspace. The second is the Git index, and the third is the repository itself. If a file is staged, then it is added to the index, but not yet committed to the repository.

Your problem, that committed files are decorated instantly after the commit as "staged" could result from a conflict with line endings. There are some possible settings in your Git configuration, with the key core.autocrlf, and there are a lot of discussions about the right configuration.
You can find more about general Git configuration here: http://www.kernel.org/pub/software/scm/git/docs/git-config.h tml

[Updated on: Wed, 09 February 2011 16:42] by Moderator

Re: why are some files "staged" other committed ? [message #653546 is a reply to message #653452] Thu, 10 February 2011 03:40 Go to previous messageGo to next message
Eclipse UserFriend
Are you working on Linux? If yes, do the files which are marked as dirty (e.g. FallingParticleStar.java) have the executable bit set? If yes you may have hit https://bugs.eclipse.org/bugs/show_bug.cgi?id=307560 which I am currently working on.
Re: why are some files "staged" other committed ? [message #653547 is a reply to message #653546] Thu, 10 February 2011 03:46 Go to previous message
Eclipse UserFriend
Christian Halstrick wrote on Thu, 10 February 2011 03:40
Are you working on Linux? If yes, do the files which are marked as dirty (e.g. FallingParticleStar.java) have the executable bit set? If yes you may have hit https://bugs.eclipse.org/bugs/show_bug.cgi?id=307560 which I am currently working on.

I'm on Linux and OSX and on both the classes marked as stages do have the x right set. So that's probably the reason.

I'll follow the bug then.

cheers,
Tex


Previous Topic:single repo, many projects: how to add a new project
Next Topic:Confirmation of possible bug please?
Goto Forum:
  


Current Time: Mon Jul 07 22:25:08 EDT 2025

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

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

Back to the top