On 2016-05-20, at 11:16 AM, Sharan Basappa <sharan.basa...@gmail.com> wrote:

> Folks,
> Git mentions that state of the file as untracked, unmodified, modified and 
> staged.
> As I understand untracked files are not yet in the respository.
> unmodified and modified is understood but what action results in a file being 
> in staged state?
> is it git add or git commit?

As I understand it:

"Staged" essentially means that the file has been added to the Git filesystem, 
but is not yet associated with any commit. It is also called, "cached".

Because it is in the file system, the tools that do things such as showing you 
differences, merging, etc. can work with it. And, if it appears in a commit, 
all Git needs to do is record the username to internal name mapping.

Internally, (and this format has changed, but I believe this is correct for the 
current version of Git), the "index file" stores up to three different internal 
names for each username for the current check out--one for the "ready to 
commit" version, and as many as two versions for resolving merge conflicts.

A file becomes staged from the Git add command

Entertaining minecraft videos

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to