Reverting the Changes in with git revert command
Use git log to view the commit history and find the commit you want to revert. Note the commit hash or identifier.
Execute the git revert command followed by the commit hash you want to revert. For example:
$git revert abc123
$git revert
Git will open a text editor for you to review and edit the default commit message. Provide a descriptive message to explain why the revert is being done. Save and exit the editor.
Git will apply the revert and create a new commit. This commit will undo the changes made in the specified commit.
If you want to push the reverted changes to a remote repository, run git push after the revert to update the remote repository with the new commit.
$git push