> On 2019-11-21, at 12:44 AM, Uwe Brauer <[email protected]> wrote:
> Maybe this idea will help you understand. > Git maintains a "potential next commit" at all times. This is called the index, or staging area. > The "add" command is used to put something into the potential next commit. Well in the previous response I understand that this makes sense, if there is choice, because say several lines in a file have been changed and I might want to pick only a few of them, but if there is only *one* change? See my example script git init echo 1 > 1 git add 1 git commit -m 1 echo 1.1 > 1 git add . # git add . Is needed because two actions were done: add a file # add a line to file. git commit -m 1.1 echo 1.2 > 1 #git add . # now I am puzzled there is only *one* change, adding a line to file, so # there is nothing to chose, while if I had added several lines, there # would be choice, so I don't understand git add . here git commit -m 1.2 echo 1.2.1 > 1 #git add . # Same doubt git commit -m 1.2.1 > Commit in turn just copies that potential next commit into a long-term store. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/87lfs7htkg.fsf%40mat.ucm.es.
smime.p7s
Description: S/MIME cryptographic signature
