Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
# Using https://github.com/evilz/vscode-reveal
theme : "black"
# https://github.com/hakimel/reveal.js/tree/master/css/theme
transition: "slide"
# transition: "zoom"
highlightTheme: "darkula"
# parallaxBackgroundImage: "background.jpg"
# parallaxBackgroundSize: "6784px 2151px"
# parallaxBackgroundHorizontal: "1000px"
# parallaxBackgroundVertical: "1000px"
---
# Git LFS @ SSEC
Nick Bearson
---
# Who is this for?
* Algorithm developers tweaking input datasets - these rarely get versioned well, if at all.
* Software developers who want to preserve test results for future regression tests.
* Anyone who wants to keep & version data next to their code!
---
# What is Git LFS?
--
Git LFS is an extension for Git which lets you split large binary files into two:
1. A Git LFS cache pointer (small, text) which gets versioned & stored alongside your code.
2. The actual file is sent to a Git LFS store which the cache pointer references.
Think of it like emailing someone a URL instead of attaching an entire file.
--

Image credit: Github.com
---
# How Do I Use It?
--
```bash
git lfs install
git lfs track "my_large_dataset.hdf"
git lfs track "*.nc"
git add .gitattributes
git add my_large_dataset.hdf another_file.nc
git commit -m "Add my datasets using Git LFS"
git push origin master
```
* After the initial install & track commands, you can use the repository like you would any other.
* Remember to track any new, large binary-ish files before you commit them!
--
# Other Features
* File Locking
```bash
git lfs track "*.nc" --lockable
git lfs lock my.nc
git lfs unlock my.nc
```
* Faster Clones - perform a git checkout before downloading from the LFS store
```bash
git lfs clone
```
---
| Provider | Storage Quota |
| ------------------- | ---------------------------- |
| Gitlab.com | 10 GB |
| GitHub.com | 1 GB free, $5 / 50 GB after |
| Bitbucket.com | 1 GB soft cap, 2 GB hard cap |
|gitlab.ssec.wisc.edu | ∞? (talk to TC) |
--
## Gitlab.com
* "For GitLab.com, the repository size limit is 10 GB."
* https://docs.gitlab.com/ee/user/admin_area/settings/account_and_limit_settings.html
* https://docs.gitlab.com/ee/workflow/lfs/manage_large_binaries_with_git_lfs.html
--
## GitHub.com
* "All personal and organization accounts using Git LFS receive 1 GB of free storage and 1 GB a month of free bandwidth."
* "Git LFS is available for every repository on GitHub, whether or not your account or organization has a paid plan."
* https://help.github.com/articles/about-storage-and-bandwidth-usage/
--
## Bitbucket
* Soft limit of 1 GB – In-product and email notifications will give you a heads-up that you’re approaching the limit.
* Hard limit of 2 GB – Pushing to the repository will be disabled until you’re back under the limit.
* https://blog.bitbucket.org/2014/05/30/repository-size-limits/
---
# An Example
--
https://gitlab.ssec.wisc.edu/geocat/geocat-ancillary
--

--

---
# Resources
https://www.atlassian.com/git/tutorials/git-lfs
https://git-lfs.github.com/
https://github.com/git-lfs/git-lfs/wiki/Tutorial