Cjku/git: Difference between revisions

382 bytes added ,  29 October 2014
Line 311: Line 311:
<div style="background-color: rgba(250, 255, 240, 1); border-style:dashed; border-width:1px;border-color:grey">
<div style="background-color: rgba(250, 255, 240, 1); border-style:dashed; border-width:1px;border-color:grey">
<center>'''Note'''</center>
<center>'''Note'''</center>
*"Commit-ish" are identifiers that ultimately lead to a commit object.
'''<object>''' indicates the object name for any type of object.
*"Tree-ish" are identifiers that ultimately lead to tree (i.e. directory) objects. Examples:


<sha1> <refname> are all tree-ish
'''<blob>''' indicates a blob object name.
 
'''<tree>''' indicates a tree object name.
 
'''<commit>''' indicates a commit object name.
 
'''<tree-ish>''' indicates a tree, commit or tag object name. A command that takes a <tree-ish> argument ultimately wants to operate on a <tree> object but automatically dereferences <commit> and <tag> objects that point at a <tree>.
 
'''<commit-ish>''' indicates a commit or tag object name. A command that takes a <commit-ish> argument ultimately wants to operate on a <commit> object but automatically dereferences <tag> objects that point at a <commit>.
</div>
</div>


It says a user may reset '''a commit''' or '''paths'''. Reset a commit is literally equal to reassign the referee(commit object) of the current branch to a new one. In this case, you have tree options(--merge and --keep are ignore here)
There are two forms: reset HEAD to a <commit> and reset paths from a <tree-ish>. In the first case, you have tree options(--merge and --keep are ignore here)
   git reset [--mixed | --soft | --hard] [<commit>]
   git reset [--mixed | --soft | --hard] [<commit>]


Confirmed users
1,643

edits