Re: Git terminology: remote, add, track, stage, etc.
flat view
From: Thore Husfeldt <hidden>
Date: 2016-06-15 22:49:50
On 21 Oct 2010, at 14:56, Drew Northup wrote:
That's not what I asked. [... good, concrete example omitted...] $ vim A.txt $ git stage A.txt $ git commit $ vim C.txt $ vim A.txt $ git stage A.txt $ git stage C.txt Should the last two commands fail?
No, not for me. (Is this in reaction to Jakub’s suggestion that an “untracked file”, like C.txt, cannot be staged before explicitly tracked?) Maybe this is what should happen: $ git stage C.txt git stage: Contents of previously untracked file C.txt staged for next commit
Now, if "git stage" were an outright replacement for "git add" there might be more use (but I'd still not be happy about the corruption of the idiom).
I tend to agree. But look at, e.g., Figure 2.1 in the Pro Git book http://progit.org/book/ch2-2.html . That view strongly enforces that something special happens to the new “pink” file, different from what happens to a “yellow” file. After this helpful discussion, I don’t like figure 2.1 so much anymore. A red arrow should go from “pink” to “blue” with text “stage the file”.