Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:57 Go to next message
Tex Twil is currently offline Tex TwilFriend
Messages: 179
Registered: July 2009
Senior Member
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 20:42 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
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 21:41 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
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 21:42]

Report message to a moderator

Re: why are some files "staged" other committed ? [message #653546 is a reply to message #653452] Thu, 10 February 2011 08:40 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 18
Registered: July 2009
Junior Member
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 08:46 Go to previous message
Tex Twil is currently offline Tex TwilFriend
Messages: 179
Registered: July 2009
Senior Member
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: Tue Mar 19 05:22:13 GMT 2024

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

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

Back to the top