You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I just converted an existing repo to use LFS after I found it had exceeded 2GB in size. I followed the instructions here: https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/
Everything seemed to go fine, but when I clone the repo now, and install LFS, then restart SourceTree, the files stored in LFS get downloaded to my local repo, but they all show up as changed files that need to be committed and pushed to origin! As a test, I committed only one of the 1200+ files and pushed it to origin. When I checked the commit in Bitbucket, I can see that the previous revision of the file is in LFS, but the new commit puts the file back into the repo where it was previously. I reverted that commit and I can see the file went back to being in LFS, but now my local copy of the file in the file system is 1KB and unreadable (hasn't been downloaded from LFS). Restarting SourceTree causes the file to be downloaded again, and my count of files that need to be sommitted/pushed goes back to the original value.
I do not understand how I got here and what can be done to resolve this. Any suggestions would be appreciated.
It appears the .gitattributes file was missing from my repo, and the config file needed to be manually updated to contain the lines related to LFS. I was able to copy the config file lines from the config file that was generated following the conversion process, and I was able to copy the .gitattributes file from another repo and alter it for the file types that LFS applies to in this repo.