diff --git a/git-lfs.md b/git-lfs.md new file mode 100644 index 0000000000000000000000000000000000000000..c2da274571bb7562099f78967b801280d6a47f42 --- /dev/null +++ b/git-lfs.md @@ -0,0 +1,51 @@ +# git-lfs + +## Is it for me? +Large (especially binary) files in project you want to track via git. + +- researchers with (result) data sets (but …) +- web designers (pictures) + + +## Why git lfs? +- big blobs problematic in git +- each commit creates new tree of objects +- reuses unmodified objects +- delta compression on modified objects + +https://www.youtube.com/watch?v=iJ3hXuEVKAc +./img/Tracking\ huge\ files\ with\ Git\ LFS\ -\ LinuxCon_2.pdf + + +## Why git lfs? +- delta compression does not work well for binary blobs +- e.g. change colour of image, the whole blob changes + +## Solution? +- git lfs does stores big blobs outside of your repo +- git lfs stores references to those blobs in repo + +## Me needs blobs not the references! +- git checkout repo as usual +- git lfs fetch the blobs of your current branch tip + +## How do I? +- `git lfs install` # is global +- specify which blobs `git lfs track "*.jpeg"` +- git add cat.jpeg + +## smudge and clean filter +- are set up when git lfs is installed +- clean converts blobs in pointers +- smudge converts pointers in blobs +- all done in background +- if you only want to download blobs on request you need --skip-smudge + +## authentication +It should work even if git repo and lfs store are not connected using the client as proxy. + + +## convert +- old: bfg repo-cleaner + +