kannonboy kannonboy
play

@kannonboy @kannonboy Photo: Le Monde en Vido @kannonboy - PowerPoint PPT Presentation

@kannonboy @kannonboy Photo: Le Monde en Vido @kannonboy @kannonboy Photo: Le Monde en Vido Git LOB! Git LFS! @kannonboy @kannonboy Photo: Le Monde en Vido ok cool Git LFS! @kannonboy @kannonboy Photo: Le Monde en Vido


  1. @kannonboy @kannonboy Photo: Le Monde en Vidéo

  2. @kannonboy @kannonboy Photo: Le Monde en Vidéo

  3. Git LOB! Git LFS! @kannonboy @kannonboy Photo: Le Monde en Vidéo

  4. ok cool Git LFS! @kannonboy @kannonboy Photo: Le Monde en Vidéo

  5. Practical workflows with Git LFS TIM PETTERSEN • SENIOR DEVELOPER • ATLASSIAN • @KANNONBOY

  6. Agenda THE PROBLEM WITH BIG FILES GIT LFS CONVERTING YOUR REPO TIPS FOR TEAMS @kannonboy

  7. data model @kannonboy

  8. master feature/JIRA-123 @kannonboy

  9. git cat-file -p 98ca9 $ fad3d.. parent bab1e.. tree 434bb.. 98ca9.. committer Tim P <kannonboy@…> 1455209277 -0800 author Tim P <kannonboy@…> 1455209277 -0800 My life is my commit message. bab1e.. @kannonboy

  10. git cat-file -p 434bb $ fad3d.. 100644 blob ace23.. .gitignore 100644 blob dbdbd.. README.md 040000 tree a0bc3.. app 98ca9.. 040000 tree 33d33.. con fj g 434bb.. 100755 blob b1de7.. deploy-prod.sh 100755 blob 7011e.. deploy-staging.sh bab1e.. type fj lemode SHA-1 @kannonboy

  11. master ace23.. 1010101 fad3d.. dbdbd.. 1010101 1010101 a0bc3.. 1010101 98ca9.. 33d33.. 434bb.. 1010101 b1de7.. 1010101 bab1e.. 7011e.. 1010101 @kannonboy

  12. fad3d.. 98ca9.. bab1e.. @kannonboy

  13. fad3d.. 98ca9.. bab1e.. @kannonboy

  14. 150mb fad3d.. 434bb.. 100mb 98ca9.. dabad.. 50mb bab1e.. 86753.. @kannonboy

  15. @kannonboy

  16. Git LFS (Large File Storage) @kannonboy

  17. $ fad3d.. 434bb.. Git host 98ca9.. dabad.. bab1e.. LFS store 86753.. @kannonboy

  18. ☞ ☞ ☞ git push $ fad3d.. 434bb.. Git host 98ca9.. dabad.. bab1e.. LFS store 86753.. @kannonboy

  19. ☞ ☞ ☞ git pull $ fad3d.. 434bb.. Git host 98ca9.. dabad.. bab1e.. LFS store 86753.. @kannonboy

  20. ☞ ☞ ☞ ☞ ☞ ☞ fad3d.. fad3d.. git cat-file -p 4749d $ bdd12.. 434bb.. 434bb.. version https://git-lfs.github.com/spec/v1 98ca9.. 98ca9.. oid sha256:325ddfb… size 29342295 dabad.. dabad.. 4749d.. bab1e.. bab1e.. 86753.. 86753.. 778aa.. @kannonboy

  21. $ brew install git-lfs $ git lfs install @kannonboy

  22. $ cat ~/.gitconfig [filter "lfs"] clean = git-lfs clean %f smudge = git-lfs smudge %f required = true @kannonboy

  23. $ git lfs track “*.mp4” $ cat .gitattributes *.mp4 filter=lfs diff=lfs merge=lfs -text @kannonboy

  24. ☞ Work tree Clean fj lter Index (git-lfs clean) massive_video.mp4 massive_video.mp4 .git/objects dev $ git add @kannonboy .git/lfs/objects

  25. ☞ Commit tree Smudge fj lter Work tree (git-lfs smudge) massive_video.mp4 massive_video.mp4 .git/objects dev $ git checkout @kannonboy LFS Store .git/lfs/objects

  26. $ cat ~/.gitconfig [filter "lfs"] clean = git-lfs clean %f smudge = git-lfs smudge %f required = true @kannonboy

  27. git push / pull .git/objects Hosted repo .git/lfs/objects LFS store @kannonboy

  28. $ ls .git/hooks/ commit-msg.sample post-update.sample pre-commit.sample pre-push ... @kannonboy

  29. $ git push Git LFS: (12 of 13 files, 1 skipped) 168.75 MB / 180.87 MB, 12.12 skipped Counting objects: 22, done. ... @kannonboy

  30. $ git pull remote: Counting objects: 3, done. ... Downloading massive_video.mp4 (38.79 MB) ... 1 file changed, 2 insertions(+) @kannonboy

  31. $ git clone ssh://git@bitbucke.. Cloning into ‘big_repo’ ... Downloading massive_video.mp4 (38.79 MB) ... Checking out files: 100% (13/13), done. @kannonboy

  32. ☞ Converting to Git LFS @kannonboy

  33. ☞ !? 150mb !? 41222.. ace34.. 150mb fad3d.. 434bb.. 100mb 98ca9.. dabad.. @kannonboy

  34. git filter-branch $ git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch big_video.mp4’ \ --prune-empty --tag-name-filter cat -- --all ! S I H T O D T ’ N O D @kannonboy

  35. $ git filter—branch --prune-empty --tree-filter ' git config -f .gitconfig lfs.url “https://bitbucket.example.com/team/repo.git” git lfs track "*.mp4" git add .gitattributes .gitconfig for file in $(git ls-files | xargs git check-attr O filter | grep "filter: lfs" | sed -r "s/(.*): D T filter: lfs/\1/"); do ’ N O git rm -f --cached ${file} D S I H git add ${file} T ! R done' --tag-name-filter cat -- --all E H T I E @kannonboy @kannonboy

  36. BFG Repo-Cleaner @kannonboy @kannonboy

  37. BFG Repo-Cleaner built to 10-720x faster Git LFS kill history than fj lter-branch support @kannonboy @kannonboy

  38. $ git filter—branch --prune-empty --tree-filter ' git config -f .gitconfig lfs.url “https://bitbucket.example.com/team/repo.git” git lfs track "*.mp4" git add .gitattributes .gitconfig for file in $(git ls-files | xargs git check-attr O filter | grep "filter: lfs" | sed -r "s/(.*): D T filter: lfs/\1/"); do ’ N O git rm -f --cached ${file} D S I H git add ${file} T ! R done' --tag-name-filter cat -- --all E H T I E @kannonboy @kannonboy

  39. $ brew install bfg $ bfg —-convert-to-git-lfs ‘*.{zip,mp4}’ --no-blob-protection @kannonboy

  40. Enable in Bitbucket @kannonboy

  41. Tips for teams @kannonboy

  42. Beware merge conflicts @kannonboy @kannonboy

  43. …meanwhile in @kannonboy

  44. …meanwhile in @kannonboy

  45. Teamwork Teamwork @kannonboy @kannonboy

  46. $ git lfs fetch --recent $ git config lfs.fetchrecentalways “true” lfs.fetchrecentrefsdays (default = 7) lfs.fetchrecentcommitsdays (default = 0) lfs.fetchrecentremoterefs @kannonboy

  47. Fetch the bare necessities Fetch the bare necessities @kannonboy @kannonboy

  48. # for a build that just runs the unit tests $ git config lfs.fetchexclude Assets/** # for an audio engineer $ git config lfs.fetchinclude Assets/Audio/** @kannonboy

  49. GUI tools @kannonboy @kannonboy

  50. 1. Install EGit Team Provider version 4.2+ 2. Make sure git-lfs is on your path @kannonboy

  51. SourceTree @kannonboy

  52. Looking docs for git-lfs.github.com more? source github.com/github/git-lfs Bitbucket Server atlassian.com/bitbucket Bitbucket Cloud coming soon! @kannonboy

  53. @kannonboy @kannonboy

  54. Thank you! TIM PETTERSEN • SENIOR DEVELOPER • ATLASSIAN • @KANNONBOY

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend