Re: [RFC PATCH 0/2] Teach how to discard changes in the working directory

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

 



Anders Melchiorsen <mail@xxxxxxxxxxxxxxxx> writes:

> Using "git checkout" to undo local changes is a hint that is often
> given in #git. This patch (part 2) adds the hint into the status
> output. A bit of restructuring appears in the initial patch.
>
> This is merely an RFC, I am not sure whether I like it myself :-).

While I think the patch means well, I personally think that the output is
already too chatty with these "friendly hints" about add/rm/reset.  After
this series, will we be adding 'use "git checkout HEAD -- <path>" to go
back to the state of the latest commit', and then "if you want to stage
only part of the change, use "git add -i <path>"?  "To temporarily remove
the change use "git stash"?

I would agree that "hint is often given in #git" is an indication that
people do not know "git checkout" to check out the path from the index to
get rid of the change.  I further suspect that "I modified my file and git
status says 'Changed but not updated'; what should I do" may not be asked
often anymore, which might owe the hint we have in status output.  Even
then, I do not necessarily agree that the status output (yes, I am also
questioning the existing hints as well) is the best place to teach these
people.

The approach would lead to insanely long output that reproduces the user
manual, and we should draw the line somewhere.  As I said, I suspect that
what we say is already too chatty.

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

  Powered by Linux