Undoing changes in git: git checkout, git reset, git revert, git reset

Опубликовано: 04 Октябрь 2024
на канале: Logan Lee
49
2

Hello. There are cases when we are using git that we may want to undo changes. This could be changes in the local file, unstaging files from the index, reverting changes made by a commit, or resetting to a commit.

In this tutorial, we go through all of the above use cases.

Here are the commands covered in this video.
1. Undoing local changes using git checkout
2. Unstaging a file using git reset
3. Reverting a particular commit by git revert
4. Three ways of resetting commit -- soft, mixed and hard. git reset --soft , git reset, git rest --hard

It is very convenient to know how to undo changes when using git. By watching this video you will be empowered to undo changes as you see fit.

Thanks.