Migrate after force push

I've got a private git repo I want to make public in the future. Unfortunately, I had hardcoded a password for testing which I now need to get rid of.

So I performed a local git filter-branch search-replace and force-pushed it to bitbucket. Now, the original commits (with the password) are still visible.

Any way to change this? Any way to move the tags or even comments from the old commits to the new ones?

Any help appreciated!

2 answers

This widget could not be displayed.

No, I don't get that? If you use filter-branch to remove things that way and then force-push all the new refs (replacing all the old refs), none of the old commits should be visible as they're not on any ref anymore.

Where do you see the old commits? Or is it when you explicitly go to the old changeset URL that you still see that commit? In that case that is to be expected, as git doesn't immediately remove commits (it wait up to a month before it actually deletes old commits from disk).

If this is not helpful, feel free to contact support by emailing support@bitbucket.org. Be sure to include URLs to the places where you see references to your old commits and we'll have a look.

This widget could not be displayed.

How I can get list of all commits in new branches from pre-receive hook?

Example: I create a new branch and add several commits. After that I push new branch on remote repo. Git rev-list show only last commit_id.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

30 views 3 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you