GIT-LFS-LOCKS(1)
π GIT-LFS-LOCKS(1) β like, the locks one π
okay so bestie, welcome to git-lfs-locks β the page for the git lfs locks command, aka your personal window into every single file that somebody's got locked on the Git LFS server πβ¨ no cap it's genuinely useful.
β¨ SYNOPSIS β¨
git lfs locks [options]
that's it. that's the whole vibe. one command, a pile of options, let's go π
π¦ DESCRIPTION π¦
it lists the current locks from the Git LFS server. that's the whole assignment π like, you run it and it tells you what's locked right now. iconic behaviour honestly.
π OPTIONS π (the good part, fr fr)
-r <name>,--remote=<name>β picks which Git LFS server you're talking to. heads up bestie: this gets ignored if thelfs.urlconfig key is set. so if you're sitting there going "why is my remote flag doing nothing π" β check your config, that's the culprit.-i <id>,--id=<id>β grabs a lock by its ID. returns a single result. one lock, one answer, no scrolling π«Ά-p <path>,--path=<path>β grabs a lock by its path instead. also returns a single result. pick your fighter: ID or path, either works π--localβ lists only our own locks that are cached locally, and skips the remote call entirely. offline? unbothered? this one's for you β--cachedβ lists cached locks from the last remote call. and contrary to--local, this one does include other users' locks too π so it's the full picture from last time you checked. it's intended for showing you the last known locks when you're offline, but β and this is the important bit β there is no guarantee that locks on the server have not changed in the meanwhile. so don't treat it like gospel, ngl π--verifyβ verifies the lock owner on the server and marks our own locks with'O'π₯ own locks are actually held by us, and the corresponding files can be updated for the next push. all other locks are held by someone else. and here's where it eats: contrary to--local, this option will also detect locks that are held by us even when there's no local lock information available (say, because the file was locked from a different clone π). it'll also detect 'broken' locks β for example, if someone else has forcefully unlocked our files. yeah. messy. but at least now you know π-l <num>,--limit=<num>β specifies how many results to return. keep it snappy πΈ-j,--jsonβ writes lock info as JSON toSTDOUTif the command exits successfully. this one's intended for interop with external tools, iykyk π§ but listen: if the command returns a non-zero exit code, then plain text messages get sent toSTDERRinstead. so don't pipe it blindly and then act surprised, ok? π
π SEE ALSO π
and it's all part of the git-lfs(1) suite, obviously π
that's the whole page bestie, go lock some files responsibly π¦β¨
β signed off from the GIT-LFS-LOCKS(1) page itself, matching footer and all, mwah π
π¦ where this page comes from
- arch rolling: git-lfs 3.8.1-1 Β· MIT
- nixos 26.05: git-lfs 3.8.1
- nixpkgs unstable: git-lfs 3.8.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms