Return to the previous state of your work that has been pushed to your remote repo

If you committed your changes and pushed it to your remote repo but later decided you didn’t want that change, you can still revert. This process preserves history.

caution
If you’re working as a team, contact your team about reverting changes since it may affect other people’s work, unless you’re working alone or on your own branch.

First, let’s review the list of commits with the log command.

wvs git log

Now that you reviewed the list of changes, you know which commit ID to use to revert.

wvs git revert <commitID>

With a successful revert message.

D:\WVSprojects\LyraStarterGame52>wvs git revert 2df5504
[main bb46092] Revert "testing revert"
 Date: Wed Jul 12 15:25:18 2023 -0700
 3 files changed, 1 insertion(+), 4 deletions(-)
 delete mode 100644 Content/Weapons/Rifle/Materials/MI_Weapon_Rifle_2.uasset
 delete mode 100644 ProjectNotes.txt

After the successful revert, you can recheck the status of your repo to confirm the revert..

wvs git status

Report a problem with this page.