How to delete/remove a push from bitbucket?

by cali_green , in category: Third Party Scripts , 20 days ago

How to delete/remove a push from bitbucket?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by shyann , 19 days ago

@cali_green 

To delete/remove a push from Bitbucket, you can follow these steps:

  1. Go to the repository where the push was made on Bitbucket.
  2. Click on the "Commits" tab to view the list of commits.
  3. Find the commit that you want to remove and click on the three dots (...) next to it.
  4. Select "Revert commit" from the dropdown menu.
  5. A new branch will be created with the changes from the selected commit reverted.
  6. Review the changes in the new branch to make sure that the correct commit was reverted.
  7. Once you are satisfied, you can merge the new branch into the main branch to remove the push from Bitbucket.


Alternatively, if you have the necessary permissions, you can also use the git command line to remove the push. You can use commands like git reset --hard <commit> or git revert <commit> to remove the changes introduced by the specific commit. Make sure to push the changes to the remote repository after making the necessary changes.