Peter Vereshagin <> writes:

> Am wondering if 'checkout branch path' undeletes the files?

"git checkout branch path" (by the way, "branch" does not have to be
a branch name; any commit object name would do, like "git checkout
HEAD^^ hello.c") is a way to check out named path(s) out of the
named commit.

If the commit "branch" has "path" in it, its contents are checked
out to "path" in your current working tree (and the entry in the
index updated to match it).

If you happen to have removed "path" in your current working tree
before running that command, it might look as if there is some
undelete going on, but that is a wrong way to look at things.  The
version of "path" in the "branch" may or may not be similar to what
you have removed earlier.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to