📝 Edit page
➕ Add page
git
Git CLI docs
Reset, restore and revert
There are three commands with similar names: git reset, git restore and git revert.
git-revert[1] is about making a new commit that reverts the changes made by other commits.
git-restore[1] is about restoring files in the working tree from either the index or another commit. This command does not update your branch. The command can also be used to restore files in the index from another commit.
git-reset[1] is about updating your branch, moving the tip in order to add or remove commits from the branch. This operation changes the commit history.