Revert

更新时间:
复制 MD 格式

The Git revert command rolls back a specific commit by generating a new commit that reverses the original changes.

Procedure

  1. 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.

  2. In the upper-right corner, click the image icon and then click Revert.

  3. 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.

  4. 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.

  5. 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.

  6. 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.