git add - Git documentation: about `revert` subcommand of `git add -i` -
git documentation revert
subcommand of git add -i
:
revert
has similar ui update, , staged information selected paths reverted of head version.
maybe incorrectly understand text... understand like:
revert
samegit checkout -- file_name
.
but @ practice see revert
removes file staging area. did incorrect translat, or incorrect text in documentation?
there difference between subcommand revert (on interactive mode) command revert , command reset.
- the first 1 opposite of git add, , able use if run git add --interactive
- the second 1 used revert commits (will add new commit opposite operations of reverted commit).
- the last 1 git add subcommand revert (first one), mean, undo git add command (unless specify commit, see documentation).
so if want reset file have use git checkout -- head filename
documentation:
Comments
Post a Comment