Confirmed users
1,643
edits
| Line 378: | Line 378: | ||
No surprise, there are also two usages in checkout: checkout a '''branch''' or checkout '''files''' | No surprise, there are also two usages in checkout: checkout a '''branch''' or checkout '''files''' | ||
checkout a branch means | checkout a branch means | ||
# <span style="color:red">(Different with reset)</span> Change the referee(branch | # <span style="color:red">(Different with reset)</span> Change the referee(branch) of HEAD. | ||
# <span style="color:red">(Similar to reset --hard)</span> Regenerate index according to the tree of the new assign commit object; Overwrite all '''modified''' tracked files in working directory. (Note: only tracked and dirty files will be overwritten by reset --hard. Unchanged files and untracked files are out of scope. checkout-aborting has direct relation with this principle). | # <span style="color:red">(Similar to reset --hard)</span> Regenerate index according to the tree of the new assign commit object; Overwrite all '''modified''' tracked files in working directory. (Note: only tracked and dirty files will be overwritten by reset --hard. Unchanged files and untracked files are out of scope. checkout-aborting has direct relation with this principle). | ||