The Git revert command rolls back a specific commit by generating a new commit that reverses the original changes.
Procedure
-
On the Codeup console page, select your target code repository. In the left navigation pane, click Commits. Then choose a commit from the target branch to open its details page.
-
In the upper-right corner, click the
icon and then click Revert. -
Select the target branch for the revert. We recommend selecting Create a new branch and submit a merge request to review this change to ensure the process is compliant and traceable. In the Revert dialog box, choose the target branch (for example,
alone_test) from the Select target branch drop-down list. -
Complete the merge request information and click OK. On the new merge request page, verify that the title and description are auto-filled with revert-related details. As needed, add Reviewers, Labels, and Associated instances. Then click OK to create the merge request.
-
After the review is complete, click Merge in the upper-right corner. Choose a merge method as needed—the default option works in most cases. Review the merge details and click Submit.
-
If you did not select Create a new branch and submit a merge request to review this change and are not using a merge request, you can push the current commit directly to the target branch to complete the revert.