GIT LFS Locks (VS Code Extension)
Repo name: vscode-is-git-lfs-locks
Extension ID (name): git-lfs-locks
Display Name: GIT LFS Locks
Publisher: Illuminia Studios
A minimal VS Code extension that adds Lock and Unlock to the Explorer context menu for files and folders, using Git LFS.
Features
- Right-click any file or folder → GIT LFS 🔀 → Lock 🔒 / Unlock 🔓
- Multi-selection support
- Per-repo execution, relative paths for Git
- Smart unlock: Only attempts to unlock files you actually have locked
- Optional background or terminal execution
- Safe defaults: skip ignored files and limit to LFS-tracked files
Requirements
- Git and Git LFS must be installed and configured on your machine.
- The selected files should be tracked by LFS via
.gitattributes.
Settings
{
"git-lfs-locks.recursiveFolderLock": true,
"git-lfs-locks.onlyLfsTrackedFiles": true,
"git-lfs-locks.skipGitIgnored": true,
"git-lfs-locks.forceUnlock": false,
"git-lfs-locks.useTerminal": false
}
Commands
git-lfs-locks.lock → Locks files via git lfs lock
git-lfs-locks.unlock → Unlocks files via git lfs unlock (optional --force)
Development
npm install
npm run watch # compile in watch mode
# Press F5 in VS Code to start the Extension Development Host
Packaging (VSIX)
- Install
vsce if needed: npm i -g vsce
- Build:
npm run compile
- Package:
vsce package
Push to Azure Repos (Azure DevOps)
- Create a new Azure DevOps project (if not already).
- Create a new Git repository named
vscode-is-git-lfs-locks.
- Locally:
git init
git add .
git commit -m "Initial commit: GIT LFS Locks extension"
git branch -M main
# Replace URL with your Azure DevOps repo URL
git remote add origin https://dev.azure.com/<org>/<project>/_git/vscode-is-git-lfs-locks
git push -u origin main
License
MIT
| |