Skip to content
Snippets Groups Projects
presentation.md 3.25 KiB
Newer Older
---
# 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.

--

![Git LFS Diagrammed: Animation](lfs-map.gif)
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

--

![Geocat Ancillary Repo](geocat-ancil-01.png)

--

![Geocat Ancillary Repo](geocat-ancil-02.png)

---

# Resources

https://www.atlassian.com/git/tutorials/git-lfs

https://git-lfs.github.com/

https://github.com/git-lfs/git-lfs/wiki/Tutorial