Re: [PATCH v2] git-checkout.txt: Document "git checkout <pathspec>" better

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

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

> My v3 will probably use the original line:
> git-checkout - Checkout a branch or paths to the working tree

I think mentionning "Switch branch" was a real improvement. For someone
not familiar with the version control vocabulary, "checkout" does not
mean much (just looked in a dictionary, it talks about payment and
leaving a room in a hotel ...). And someone not understanding what
"checkout" means in this context won't be helped much reading the
description and getting "checkout" there.

(Ironically, Junio did almost the same remark when I proposed to
document "git describe" as "Describe ...", but the word "describe" does
not have the ambiguity problem that "checkout" has)

> 'git checkout <commit> -- <path>'
> will "copy" the version from another commit into the workspace.

If <commit> exists, it means that the state of this path existed
somewhere in <path> in the past (well, modulo "git add -p" and other
ways to cheat with history).

So, to me, "restore a previous version" does apply in this case. Perhaps
"restore a recorded state into the worktree" (my favorite up to now I
think).

But as you say, it copies into the workspace, so "copy a previous
version into the workspace" sounds good to me.

Basically, I'm fine with anything starting with "Switch branches or",
but please do change the headline ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]