Skip to content

Instantly share code, notes, and snippets.

@artlung
Created December 15, 2021 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artlung/767e2fcf8793897705f797c47f04080d to your computer and use it in GitHub Desktop.
Save artlung/767e2fcf8793897705f797c47f04080d to your computer and use it in GitHub Desktop.
Git LFS command generator for my blog
<?php
$i = 2001;
$types = ['jpg', 'png', 'gif'];
$years = range(2001, 2021);
foreach ($years as $year) {
foreach ($types as $type) {
echo "git lfs track blog/wp-content/uploads/{$year}/**/*.{$type};\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment