summaryrefslogtreecommitdiffstats
path: root/git.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 19:54:04 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-09 19:54:04 -0700
commitc9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db (patch)
tree06ddfc72dff8e370e395a3acc692c8ab48147227 /git.txt
parentd0a9940c76b71c9df840a098a423d3400779d83c (diff)
downloadgit-htmldocs-c9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db.tar.gz
Autogenerated HTML docs for v2.22.0-428-g6d5b2
Diffstat (limited to 'git.txt')
-rw-r--r--git.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/git.txt b/git.txt
index f9b09db89..e095514ac 100644
--- a/git.txt
+++ b/git.txt
@@ -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)
-----------------------------