On 09/02/2011 19:57, Tex Twil wrote:
> 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
> thanks for your help,
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