Bitbucket Server 4.3+ LFS Storage Question
It is awesome that Bitbucket Server 4.3 and above now have LFS as an option. I am unclear where the actual binary files will be living. Is there a secondary directory storage location, the docs completely skip over this.
Running my own Bitbucket Server would keep me from having to go and make use of GitHub to get LFS support rolling for my project, so I am hoping someone may know the answer to this question.
Hi Chris,
All of the Git LFS content is stored under $BITBUCKET_HOME/shared/data/git-lfs/storage
Hey Jeff,
I found the directory but there are no Files inside it. I pushed some .psd files into my Bitbucket lfs git now. The lfs storage is still empty. I checked the tracked file extensions with git-lfs track .... I called this inside the repository directory (clientside). Still cant see what im doing wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
When you pushed to the repository, did you see a message from Git LFS indicating that the file(s) were being uploaded? You should see something like:
Git LFS: (1 of 1 files) 22.08 MB / 22.08 MB
In the push.
As a quick test, if you modify one of the PSD files, add and commit it, and push again, do you see this message and any data in the storage directory?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Jeff,
no.... nothing about lfs. its only says this:
Pushing to http://cbarghorn@localhost:7990/scm/plt/vergleichsrepo.git POST git-receive-pack (436 bytes) To http://cbarghorn@localhost:7990/scm/plt/vergleichsrepo.git 3155b55..a435c1c master -> master updating local tracking ref 'refs/remotes/origin/master'
I added a new psd file for this. The is nothing stored in the lfs directory. I checked the tracked extensions again. its still .psd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually i´m thinking about, how lfs knows where to put the .psd data. Does the server manage all this stuff ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm still a bit new to Git LFS, but I think that when a Git push is initiated from the client there are hooks that will detect which files are being tracked by LFS and upload them to the server. There is then an API that the LFS client and server use to manage these files and put them in the correct location.
Since we're not seeing any messages in the push from Git LFS, it seems that it's either not detecting files to upload or the LFS hooks are not firing.
Have you run git lfs install
on your client yet? This just needs to be run once, but could explain why it's not working.
After making sure that git lfs install
has been run, could you run through a similar set of steps to what I've done below? These steps worked for me to get some files uploaded.
test-lfs.psd
Tell Git LFS to track the file
git lfs track test-lfs.psd
test-lfs.psd
and .gitattributes
git add .gitattributes test-lfs.psd
Commit our files
git commit -m "Adding new files to LFS"
Push them to the server
git push origin master Git LFS: (1 of 1 files) 7.83 MB / 7.83 MB Counting objects: 4, done. Delta compression using up to 8 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 537 bytes | 0 bytes/s, done. Total 4 (delta 1), reused 0 (delta 0) To ssh://git@bitbucket.company.com:7999/proj/repo.git 8dd0d95..3b41ab2 master -> master
Let me know how that goes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works fine. Like this i can add single files to the track. So now i have to figure out how i do this for file extension, and then how i convert a whole existing repository to lfs. So far i want to thank you for your help. I appreciate this alot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay. i just had a look at my .gitattributes file. The extension ".psd" is writen there in the same style as test-lfs.psd ...:
.psd filter=lfs diff=lfs merge=lfs -text test-lfs.psd filter=lfs diff=lfs merge=lfs -text
I will try to get this t work. I will tell you how that goes thank you !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay. I figured out that my .gitattributes needs:
*.psd filter=lfs diff=lfs merge=lfs -text
instead of
.psd filter=lfs diff=lfs merge=lfs -text
only with the * it matches ALL psd files.
I am sorry bout posting so many small steps, but i want to keep this up to date for everyone who´s running into the same problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jeff Thomas ? Do you have any knowledge about this ?
Its about converting an existing Git repository to the git LFS format. I tried it with the step by step guide, but could not make it work at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.
Learn moreOnline 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.