Revert vs reset vs restore

Code examples

0
0

revert vs reset vs restore

git-revert is about making a new commit that reverts the changes made by other commits.

git-restore is about restoring files in the working tree from either the index or another commit.
		the command does not update your branch.
The command can also be used to restore files in the index from another commit.

git-reset is about updating your branch, moving the tip in order to add or remove commits from the branch. This operation changes the commit history.
			can also be used to restore the index, overlapping with git restore.

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................