Eclipse + Git – what does “staged” mean?
After working for some time with SVN I decided to try git with my new django project and installed the plugin for it into eclipse. I made a new pydev project and added django initial project files to the src directory. Then I “shared” the project to Git, added and commited all files. Now I have strange problems – all files except “manage.py” are “up to date” and manage.py has a strange icon that means it is “staged”. What does this mean? I tried to google for it, but without success. 🙁
It means your file has been added to the index.
As described in The Thing About Git
The Index is also sometimes referred to as The Staging Area.
I tend to think of it as the next patch:
You build it up interactively with changes from your working copy and can later review and revise it.
When you’re happy with what you have lined up in the staging area, which basically amounts to a diff, you commit it.
And because your commits are no longer bound directly to what’s in your working copy, you’re free to stage individual pieces on a file-by-file, hunk-by-hunk basis.
If you look to the latest change logs of egit (the eclipse Git plugin), you will see they are still fiddling with how “staged” files are managed, se the more recent your egit plugin is, the better 😉
I’d recommend that you make yourself familiar with the git command-line before embarking on using Git from inside Eclipse. The command-line is git’s primary interface, and if you aren’t comfortable with the different concepts such as index, push, pull, rebase, etc., then using Git from Eclipse will probably confuse you even more.
Isn’t it a “+” icon? Staging area in git is when file is added to the index but not committed.
From git-commit manual:
“When recording your own work, the contents of modified files in your working tree are temporarily stored to a staging area called the “index” with git-add.“
Also git-stage is an alias for git-add.