Cjku/git: Difference between revisions

Line 334: Line 334:
$ git reset refs/heads/master -- README.txt
$ git reset refs/heads/master -- README.txt


In short, a tree-ish is a thing that lead to a specific tree object. If you give a thing(name/ refname/ tag, ect...) to git, and git can resolve that thing to a unique tree object, then that thing  is a tree-ish. In the following diagram, only the name of a blob is not a tree-ish, since git git can not reach any tree object start from a blob
In short, a tree-ish is a thing that lead to a specific tree object. If you give a thing(name/ refname/ tag, ect...) to git, and git can resolve that thing to a unique tree object, then that thing  is a tree-ish. In the following diagram, only the name of a blob is not a tree-ish, since git git can not reach any tree object start from a blob. I
[[File:Git_treeish.png|center|thumb|800px|Figure N. tree-ish]]
[[File:Git_treeish.png|center|thumb|800px|Figure N. tree-ish]]
</div>
</div>
Confirmed users
1,643

edits