The pushed information cannot be returned to the local repository. So be sure to check that the branch you're working on is correct before pushing. Even so, you may accidentally push it. You can't return that information to the local repository, but you can undo incorrect commit information in the remote repository.
To undo a commit, we use a technique called revert. You can undo a commit that you accidentally pushed. Instead of deleting the commit, do an additional "commit to cancel the specified commit". revert cancels a commit by adding a change that is the opposite of the committed change