Missed Team ’24? Catch up on announcements here.

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

File in BitBucket looks normal, but local copy is corrupted

Brent L April 10, 2023

We have a file in our repository that comes down corrupted when we do a fetch. It looks fine in BitBucket and other files from the same repository download just fine. I tried deleting the file locally and doing a git discard, but it doesn't help. Everyone in the team experiences the same thing with this file.

1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 10, 2023

Hey @Brent L 

Yes, the BB web viewer has its way to overcome unprintable characters which sometimes are causing issues in local editors and/or file parsers. For example, Win end of line, the BOM, etc.

The first step would be to backup your file:

  1. Open the file in BB source viewer.
  2. Click the 3 dots button on the right side and choose "Open Raw"
  3. Copy and paste to a different file. 

The next step would be to delete the file from your repo. You can do from the web or using your local git client.

From the web, in the same 3 dots button, choose delete. Follow the instructions to create a commit on the server.

Using your git client:

  • git rm filename
  • git commit
  • git push

Again, before you begin, backup your file.

Hope that helps

Brent L April 11, 2023

Thank you very much.

What if the corruption isn't a problem with unprintable characters, but a strange scrambling of different lines? The lines read they way they should, but groups of them have been moved around haphazardly. (Sorry, I should have made this clear initially.) Your solution might be the same, but maybe the problem isn't just with that file. Maybe there's also a problem with the way the diffs have been stored?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events