Re: Git terminology: remote, add, track, stage, etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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”.--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]