Hi support,
I have just used BFG Repo-Cleaner to move several large files to Git LFS and pushed the changes.
However, when I check the Git LFS section of the repository settings on Bitbucket, I don't see any files listed there.
Should I be able to see the moved files in the Git LFS section?
If something went wrong, I would like to revert the push before asking for a cleanup.
Here is the result from running git count-objects -Hv after the push:
count: 0
size: 0 bytes
in-pack: 144812
packs: 1
size-pack: 1.36 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
Looking forward to your reply!
Best,
Camilla
Here is my commands:
My commands:
brew install git-lfs
git clone --mirror https://myuser@bitbucket.org/myuser/myrepo.git
java -jar bfg-1.15.0.jar --convert-to-git-lfs “{MyBigFiles}” --no-blob-protection myrepo.git
cd myrepo.git
git gc
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git count-objects -Hv
git push
I realize now that I should have called git lfs install as well. Hope you can do a revert. I haven't pushed anything since that last push.
Hi @cpedersen
Thank you for reaching out to the community.
Have you tried doing git push with the --force flag instead?
You can refer to our documentation here for more information: Use BFG to migrate a repo to Git LFS
Unfortunately, it is not possible for us to revert any commits on our end, however, you could do that on your end by reverting it locally and pushing your local copy using the git push --force command.
Alternatively, if you have a backup your repository locally, you can also force push that.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mark C ,
Thank you for your reply.
I’ve read the documentation many times and tried using BFG to move the files to Git LFS. But after pushing, I don’t see the files listed in the Git LFS section of the Bitbucket repo. You can see all my commands above.
Could you please tell me exactly which Git commands I should run to revert the push or fix the issue properly? I’d really appreciate a step-by-step guide, as I want to avoid making things worse.
I still have the local repository from before using BFG, but not a copy of the mirrored repository.
Looking forward to your reply.
Best,
Camilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @cpedersen
You can check this documentation on how to undo changes in Git using Bitbucket Cloud. - https://www.atlassian.com/git/tutorials/learn-undoing-changes-with-bitbucket
I'd also highly recommend taking a backup of your repository by copying your local repository and cloning your remote repository via --mirror clone just to make sure you have backup alternatives.
Here's the command:
git clone --mirror <repository URL>
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.