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 the lfs.url config 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 to STDOUT if 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 to STDERR instead. 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