tags:

views:

75

answers:

1

I am just learning git, using git version 1.6.0.4.

  • Created an eclipse wkspace, with a couple of projects in it.
  • Created a git repos at the workspace root, using cli.
  • Using cli added the two projects to git - at this point git status shows the following
bwinspur@elm:~/ca.wydv.workspaces/008-leaning-group/git-lrng-wksp$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached ..." to unstage)
#
#   new file: git.trial.help.bundle/.classpath
        === omitted details from this post ==   

#   new file: git.trial.ui.bundle/.classpath
        === omitted details from this post ==   
#
# Untracked files:
#   (use "git add ..." to include in what will be committed)
#
#   .metadata/
bwinspur@elm:~/ca.wydv.workspaces/008-leaning-group/git-lrng-wksp$

which is what I expected: my project folders are tracked, and .metadata/ is untracked.

  • now I bring up git gui and it shows all the files under .metadata/ as unstaged changes: why? git status thinks they are untracked.

Git-gui's disagreement with git status, seems like a git-gui bug to me.

Am I misunderstanding something? Is there a workaround? Is there a better gui for git?

Bill.

+1  A: 

I'm not a git-gui user but I'll guess that git-gui is using the same status for unstaged and untracked files. And yes, it could be a bug.

Unstaged means that a file is not "ready" to commit, the commit gets the files in the stage area and commit them. So, if after your commit you change 'git.trial.help.bundle/.classpath' and don't add (git add file_name) this file will be unstaged but it's tracked.

I hope it helps to clarify the meaning of unstaged. And I really recommed the Pro Git book, freely available online.

Felipe Cypriano
Thanks felipe, it does walk like a bug. Also, I agree about book git-pro, strongly endorsed.
bwinspur
followed this up on git mailing list. Untracked do show in same list as staged, but have a different icon. Some debate over this 'feature'.
bwinspur