Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I delete a push from Bitbucket?

Aïssa Ghouti
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2017

Hi,

I can't find "Strip changesets" menu like described here: http://stackoverflow.com/questions/22976506/how-do-i-delete-remove-a-push-from-bitbucket

1 answer

1 accepted

2 votes
Answer accepted
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 9, 2017

You don't mention it here, but I'm going to guess that you're talking about a git repo. That Stack Overflow answer is talking about a Mercurial repository, and Mercurial is the only one of the two systems that has the "strip" function.

For git, you'll need to remove the bad commit(s) locally, then force-push your revised branch(es). http://stackoverflow.com/a/1338744/5054717 discusses some of that approach, but be warned that you're probably going to break things for anybody else who uses the repo.

Stuart Longland September 11, 2018

One gotcha, Jira counts the commits that are tagged with a given issue ID.

When you force-push new commits *replacing* the old ones, it still counts the old ones even though they're inaccessible without knowing the commit ID (and are not wanted).

In my case, I was taking a feature branch (git flow) having finalised the functionality, and squashing about 150 commits down to about 50.  After I was done, Jira reported about 250 commits when Bitbucket's branch viewer showed there was much less.

Thus, the commits still hang around like an unwanted bat colony in cases where you have Jira cloud linked with Bitbucket cloud.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, compass, developer experience, devex, platform engineering, internal developer platform, component catalog, atlassian learning, productivity tools, developer productivity, software architecture, compass webinar, engineering teams

Discover how Compass drives DevEx and productivity at Atlassian 🏃🏻‍♂️

Learn why Compass was built to tackle dev experience at scale. See how Atlassian uses it to boost visibility, reduce cognitive load, and drive consistency—plus tips to get started and customize your IDP for stronger team engagement.

Join the webinar ✨
AUG Leaders

Atlassian Community Events