diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-09 19:54:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-09 19:54:04 -0700 |
commit | c9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db (patch) | |
tree | 06ddfc72dff8e370e395a3acc692c8ab48147227 /git.txt | |
parent | d0a9940c76b71c9df840a098a423d3400779d83c (diff) | |
download | git-htmldocs-c9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db.tar.gz |
Autogenerated HTML docs for v2.22.0-428-g6d5b2
Diffstat (limited to 'git.txt')
-rw-r--r-- | git.txt | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -211,6 +211,26 @@ people via patch over e-mail. include::cmds-foreignscminterface.txt[] +Reset, restore and revert +~~~~~~~~~~~~~~~~~~~~~~~~~ +There are three commands with similar names: `git reset`, +`git restore` and `git revert`. + +* linkgit:git-revert[1] is about making a new commit that reverts the + changes made by other commits. + +* linkgit: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. + +* linkgit: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. ++ +`git reset` can also be used to restore the index, overlapping with +`git restore`. + Low-level commands (plumbing) ----------------------------- |