GitHub charges exorbitant prices for the storage of files on LFS.
50 GB on GitHub costs $5 a month
2000 GB on DropBox costs $9.99 a month
GitHub is charging 20 times more per GB!
Hence join the rebellion! Move your Git LFS files to DropBox and I hope this will force GitHub to lower their prices to a more reasonable level!
Instructions here are for GitHub, but they should work with no/minimal modifications for BitBucket or any other Git repo hosting provider.
Get lfs-folderstore binary from:
Add lfs-folderstore to path (e.g. copy to /usr//bin)
Clone the GitHub repo that you want to migrate LFS objects to Dropbox
git clone <url>
Pull all LFS objects from GitHub repo to local repo
git lfs fetch --all origin
Configure GIT to use lfs-folderstore LFS custom transfer agent
Sample Config lines to add to .git/config
[lfs "customtransfer.lfs-folder"] path = lfs-folderstore args = E:/Dropbox/git-lfs-folderstore/ns-test-data [lfs] standalonetransferagent = lfs-folder url = https://localhost
Commands to run to make the above changes to git config
git config --add lfs.customtransfer.lfs-folder.path lfs-folderstore git config --add lfs.customtransfer.lfs-folder.args "C:/path/to/your/dropbox/folder" git config --add lfs.standalonetransferagent lfs-folder git config lfs.url "https://localhost"
Push to Dropbox LFS folder
GIT_TRACE=1 git lfs push origin master --all
Check “C:/path/to/your/dropbox/folder” to verify that lfs-folderstore has copied LFS objects there. (They will be in folders with hexadecimal names like “f5”, “ee”, “1d”, etc.)
Prune local LFS objects
They are not needed because they have been copied to the DropBox folder in the previous step
git lfs prune
Verify that you can check-out past versions of LFS files
Checkout a commit 10 commits behind HEAD of master:
git checkout HEAD~10
You may check that the files tracked by git-lfs has changed accordingly.
git lfs ls-files
Lets you see which files are tracked by git-lfs.
Reset back to HEAD of master:
git checkout master
Free-up you GitHub LFS storage!
Send Email/Ticket to GitHub and ask for the LFS objects in your repo to be deleted.
Give them the name of your repo. e.g. username/repo-name and make sure it is ONLY LFS objects deleted.