Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,734
Community Members
 
Community Events
176
Community Groups

Remove file from all history

I've had a project on BitBucket for many years, and this project, only I had access to and maintained.

In this project there is a file that has existed for years that contains information about an access token for an API, but now there will be a few more people who will help me maintain this project, and I want to remove this file from all history, to not allow these other people access to the API token.

How do I remove this file completely from the history, so that it is impossible to recover any information?

I even considered creating a new project with a copy of the current project, but with that I'll lose all the history of updates that were made.

1 answer

1 accepted

0 votes
Answer accepted
Patrik S Atlassian Team May 31, 2022

Hello @ThePokyWizard ,

Thank you for reaching out to Atlassian Community! 

In order to remove the file containing the sensitive data you have to rewrite the history, and there are two different methods/tools that help you remove the sensitive information from your repository's commit history : 

I would personally recommend using BFG Repo-cleaner as I think it's easier to use and provide you with the option to instead of deleting the sensitive file, just replace the sensitive string with another one.

Both of the methods are detailed step-by-step in the documentation below, which although is for Bitbucket Server, also applies to Bitbucket Cloud, as it's pretty much standard git commands: 

In that KB you can expand the section of each of the methods to be provided with detailed instructions for each of them. You can follow those instructions and let us know in case you run into any issues.

Hope that helps! If you have any questions, feel free to ask!

Thank you, @ThePokyWizard 

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events