diff --git a/.gitignore b/.gitignore index b695b4c..65d7db3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pdf *.epub Makefile +*.xcf diff --git a/slides/lfs/inferno.png b/slides/lfs/inferno.png new file mode 100644 index 0000000..1cf2a8e Binary files /dev/null and b/slides/lfs/inferno.png differ diff --git a/slides/lfs/lfs.md b/slides/lfs/lfs.md new file mode 100644 index 0000000..34a017e --- /dev/null +++ b/slides/lfs/lfs.md @@ -0,0 +1,101 @@ +# The Horrifying Cost + +If a Git has 2806 commits, and you commit 15MB worth of output each time, then you are a menace and must be stopped. + +```text + + 2806 commits x 15MB = 41GB + +``` + +# Initial Tactics: `.gitignore` + +``` +*.pdf +*.epub +Makefile +*.xcf +``` + +...but sometimes it's not enough. + +# Saving Your Immortal Soul + +![Well deserved fate](slides/lfs/inferno.png) + +End the madness with git lfs. + +# Setup + +```bash + +apt install -y git-lfs +cd $PROJECT +git lfs install +``` + +## Output: Easy Hooks + +```bash +cat ~/.git/hooks/pre-push +``` + +``` +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 +"This repository is configured for Git LFS but +'git-lfs' was not found on your path. If you no +longer wish to use Git LFS, remove this hook by +deleting '.git/hooks/pre-push'."; exit 2; } + + +git lfs pre-push "$@" +``` + + +# Add Files + +Track all the files: + +```bash +git lfs track "*.iso" +git lfs track "*.png" +git lfs track "*.jpg" +git lfs track "*.jpeg" +git lfs track "*.tiff" +git lfs track "*.xlsx" +git lfs track "*.docx" + +cat .gitattributes +``` +Result: + +``` +*.jpg filter=lfs diff=lfs merge=lfs -text +*.svg filter=lfs diff=lfs merge=lfs -text +``` + +Double check with `git lfs ls-files`. + + +# Locking + +[ If your remote supports it ] +lock your files when working on them. + +# Migration + +Make sure you have all the files: + +```bash +git lfs fetch origin --all + +git lfs push $newRemote --all + +``` + +# Problems + +`soft-serve` does not yet support `git-lfs`. + +(end list) diff --git a/slides/rsa/dhke.xcf b/slides/rsa/dhke.xcf deleted file mode 100644 index 79d9f1b..0000000 Binary files a/slides/rsa/dhke.xcf and /dev/null differ diff --git a/slides/rsa/tor-onion-services.xcf b/slides/rsa/tor-onion-services.xcf deleted file mode 100644 index e44670f..0000000 Binary files a/slides/rsa/tor-onion-services.xcf and /dev/null differ diff --git a/slides/rsa/tor.xcf b/slides/rsa/tor.xcf deleted file mode 100644 index e9b3094..0000000 Binary files a/slides/rsa/tor.xcf and /dev/null differ