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
I'm not actually sure what is the difference between "committed" and "staged"
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
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
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.
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.