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,560,359
Community Members
 
Community Events
185
Community Groups

Delete Git LFS files

1 answer

0 votes
Baskar Annamalai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 10, 2018

Hi @Rivet

You can delete the file in LFS but the process is not the same as compare to the Bitbucket Cloud. You can proceed with the following steps:

  1. On the local git lfs, remove the file from history using the filter-branch:
    $ git filter-branch --force --tree-filter 'rm -f path/to/big_file.mpg' HEAD
    $ git reflog expire --expire=now --all && git gc --prune=now --aggressive
  2. After you remove files from Git LFS, the Git LFS objects still exist on the remote storage and will continue to count toward your Git LFS storage quota.

  3. To remove Git LFS objects from a repository, delete and recreate the repository. When you delete a repository, any associated issue key and forks are also deleted.

Regards.

Benjamin
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.
Jul 08, 2020

Hello @Baskar Annamalai , has anything changed on this? Is there in newer versions another way to delete Git LFS objects?

Baskar Annamalai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 09, 2020

Hi @Benjamin I believe there aren't any changes to Bitbucket Server on removing the objects. The documentation on disabling and deleting LFS objects is still valid.

Regards.

Like Benjamin likes this

Hello @Baskar Annamalai

We are currently two years after your latest post. Could you please let me know if anything regarding this topic has been changed?

Currently we are facing the same issue where we have a repository which we cannot migrate from Bitbucket Server to the Cloud since it has LFS pointers pointing to LFS files. We do not want to remove and recreate the entire repository cause it has a good amount of branches, tags, webhooks etc. linked to it.

The only way to migrate to the Cloud with a repository containing LFS pointers was by checking out the repository and manually, via Git Bash for example, pushing the repository to the new repository in the Cloud. This works but we will lose our pull request history which we need since we have a Jira instance running with references to these pull requests.

Currently the Atlassian migration tool does not allow LFS repositories to be migrated. Could you please inform me if you see another way of removing the LFS pointers from a repository or to migrate to the Cloud without losing the pull request history when having LFS files within the repository?

Greetings,

Jordy Mengerink

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events