These are the slides from Tim Pettersen's (@kannonboy) presentation entitled "Tracking huge files with Git LFS" at GlueCon 2016 in Broomfield, Colorado. The video is available at https://www.youtube.com/watch?v=iJ3hXuEVKAc
33. @kannonboy
LFS aware Git server LFS storeDev
git clone https://..
repo pack files
smudge
filter
cafebabe is over there
I need object cafebabe
GET …/cafebabe
object cafebabe…
34. @kannonboy
POST .../repo.git
I need object cafebabe
@kannonboy
/info/lfs/objects/batch
{“objects”:[
{
“oid”: “cafebabe...”,
“size”: 40689401
}, ...
],
“operation”: “download”}
35. @kannonboy
200 OK
{“objects”:[
{“oid”: “cafebabe…”, “size”: 40689401,
“actions”: {
“download”: {
“href”: “https://…/lfs/cafebabe…”,
@kannonboy
cafebabe is over there
“header”: {
“Authorization”: “JWT eyJ0eXA…”,
}
}
}
...
36. @kannonboy
LFS aware Git server LFS storeDev
git push
please upload it over there
I want to upload cafebabe
POST …/cafebabe
I uploaded cafebabe
37. @kannonboy
200 OK
{“objects”:[ ...
“actions”: {
“upload”: {
“href”: “https://…/lfs/cafebabe…”,
…
}
@kannonboy
, “verify”: {
“href”: “https://…/lfs/callback”,
…
}
}
...
go upload it over there
I uploaded cafebabe
38. @kannonboy
LFS aware Git server LFS storeDev
git push ssh://…
please upload it over there
I want to upload cafebabe
POST …/cafebabe
I uploaded cafebabe
where is the LFS API?
the LFS API is over there
39. @kannonboy
$ ssh git@bitbucket git-lfs-authenticate
project/repo.git download
{
“href”: “https://…/lfs/objects/batch”,
“header”: {
“Authorization”: “JWT eyJ0eXA...”
}
}
where is the LFS API?
the LFS API is over there
@kannonboy
40. @kannonboy
LFS aware Git server LFS storeDev
git clone https://..
repo data
POST /info/lfs/objects/batch
LFS objects hypermedia
GET …/<objectSHA>
smudge
filter
happens
once per
file checked
out
41. @kannonboy
LFS storeDev
git lfs clone https://..
repo data
GET …/<objectSHA>
batched
smudge
filter
subtle difference!
POST /info/lfs/objects/batch
LFS objects hypermedia
LFS aware Git server
68. @kannonboy
# for a build that just runs the unit tests
$ git lfs fetch --exclude Assets/**
# for an audio engineer
$ git lfs fetch --include Assets/Audio/**
$ git config lfs.fetchexclude Assets/**
$ git config lfs.fetchinclude Assets/Audio/**