On Tue, Apr 03, 2018 at 03:08:44PM -0700, KrzyJaski wrote:

> After
> git status
> 
> I got this message:
> Changes to be committed:
>   (use "git reset HEAD <file>..." to unstage)
> 
>     modified:   root/node/chnode.c
>     modified:   root/node/node.c
> 
> Changes not staged for commit:
>   (use "git add <file>..." to update what will be committed)
>   (use "git checkout -- <file>..." to discard changes in working directory)
> 
>     modified:   root/node/chnode.c
> 
> The same file appears twice. How to understand this?

That are basics of working with Git: a commit it created not from the
state of the files in your work tree but from a so-called "staging
area".  The content to be committed is placed into that area by the
`git add` command and removed by the `git reset` command.

Please read [1] and [2].

Reading this whole book is highly recommended.

1. https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
2. https://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified

-- 
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