Published 2025-01-24.
Time to read: 3 minutes.
git
collection.
I have published 8 articles about the Git large file system (LFS). They are meant to be read in order.
- Git Large File System Overview
- Git LFS Scripts
- Git LFS Client Installation
- Git LFS Server URLs
- Git-ls-files, Wildmatch Patterns and Permutation Scripts
- Git LFS Tracking, Migration and Un-Migration
- Git LFS Client Configuration & Commands
- Git LFS SSH Authentication
- Working With Git LFS
- Evaluation Procedure For Git LFS Servers
- Git LFS server tests:
6 articles are still in process.
Instructions for typing along are given for Ubuntu and WSL/Ubuntu. If you have a Mac, most of this information should be helpful.
These Scripts Probably Contain Errors
These scripts are incomplete and may contain errors. They have been published to allow collaboration with fact-checkers. Do not rely on this information yet.
The scripts included in the
git_lfs_scripts
GitHub repository are useful for testing and operating Git LFS.
This article lists each script and provides a link to the article that fully describes and uses the scripts.
The scripts were written for native Ubuntu and Ubuntu under WSL. Although many of them will probably work on macOS, I have not tested macOS compatibility.
Scripts for Testing Git LFS Implementations
These scripts were expressly written for this miniseries on Git LFS. They are designed to work together when testing Git LFS implementations.
Scripts for Working With Git LFS
These scripts are generally useful when working with Git LFS.
-
git-lfs-trace.html
is not a public page yet: A Git client extension that reports activity between the Git client and the Gif LFS server. -
giftless.html
is not a public page yet: Runs thegiftless
Git LFS server. -
lfs-files
: Front-end script forgit lfs ls-files
that handles wildmatch patterns, with special consideration for media files. -
ls-files
: Front-end script forgit ls-files
that handles wildmatch patterns, with special consideration for media files. -
new_bare_repo
: Creates a bare Git repository with the SGID permission set. -
nonlfs
: Lists files that are not managed by Git LFS in the current repository. -
track
: Front-end script forgit lfs track
that handles wildmatch patterns, with special consideration for media files. -
unmigrate
: Moves files migrated to Git LFS by thegit lfs migrate import
command; it includes special consideration for the wildmatch patterns of media files. -
untrack
: Front-end script forgit lfs untrack
that handles wildmatch patterns, with special consideration for media files.
Installation
The scripts are stored in the GitHub repository with the executable bits set. When you clone the repository those executable bits will remain set.
All you have to do is add the bin/
directory of the repository to the PATH
.
This will make all of the scripts available.
The following is an example of how to do that; it assumes that the path you clone the GitHub repository to does not have spaces:
$ git clone https://github.com/mslinn/git_lfs_scripts.git Cloning into 'git_lfs_scripts'... remote: Enumerating objects: 19, done. remote: Counting objects: 100% (19/19), done. remote: Compressing objects: 100% (17/17), done. remote: Total 19 (delta 2), reused 19 (delta 2), pack-reused 0 (from 0) Receiving objects: 100% (19/19), 10.77 KiB | 648.00 KiB/s, done. Resolving deltas: 100% (2/2), done.
$ echo "$(pwd)/git_lfs_scripts/bin:\$PATH" >> ~/.bashrc
$ source ~/.bashrc
$ sudo ln -s "$( which ls-files )" /usr/local/bin/lfs-files
$ sudo ln -s "$( which ls-files )" /usr/local/bin/track
$ sudo ln -s "$( which ls-files )" /usr/local/bin/untrack
About the Prompts
Throughout this series of articles, command-line sequences showing at least two computers are
often displayed. For example, the following was typed on my desktop computer called bear
from a directory called /ab/cd/ef/
:
mslinn@bear ef $ pwd /ab/cd/ef
The bash prompt highlighted above presented a lot of information. So that readers can easily keep track of what is happening where, the following was the definition for the bash prompt:
export PS1='\u@\h \W \$ '
Defining PS1
in this way displays the following:
-
User ID of the person logged in to the terminal session
(I am
mslinn
everywhere). @
delimiter.-
Network node name, which is often equivalent to the name of the computer.
Pay attention to that portion of the prompt because that will tell you the name of the computer
on which the command was executed.
I mostly used
bear
, my desktop computer running Windows 10 and WSL2, andgojira
, my Ubuntu server. - Space character
-
Current directory name. For example, if the full path of the current directory
is
/ab/cd/ef/
, then onlyef
would be displayed. - Space character.
-
$
dollar sign. - Space character.
I have published 8 articles about the Git large file system (LFS). They are meant to be read in order.
- Git Large File System Overview
- Git LFS Scripts
- Git LFS Client Installation
- Git LFS Server URLs
- Git-ls-files, Wildmatch Patterns and Permutation Scripts
- Git LFS Tracking, Migration and Un-Migration
- Git LFS Client Configuration & Commands
- Git LFS SSH Authentication
- Working With Git LFS
- Evaluation Procedure For Git LFS Servers
- Git LFS server tests:
6 articles are still in process.
Instructions for typing along are given for Ubuntu and WSL/Ubuntu. If you have a Mac, most of this information should be helpful.