GIT-LFS-LOCK(1)

✨ NAME ✨

git-lfs-lock β€” set a file as β€œlocked” on the Git LFS server.

This is the GIT-LFS-LOCK(1) page, bestie. We’re locking files today. πŸ”’βœ¨

πŸŽ€ SYNOPSIS πŸŽ€

git lfs lock [options] <path>

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so git lfs lock takes your <path> and marks it as β€œlocked” on the Git LFS server. The whole point? Blocking attempts by other users to update that path. Iconic boundary-setting behavior, honestly. πŸ’…

Lowkey important: locking a file requires the file to exist in the working copy. No phantom files, bestie. 🫢

Once it’s locked, LFS will verify that Git pushes do not modify files locked by other users. For the full tea, see the description of the lfs.<url>.locksverify config key in git-lfs-config(5). πŸ‘€

πŸ’… OPTIONS πŸ’…

  • -r <name>, --remote=<name> β€” specifies the Git LFS server to use. This is ignored if the lfs.url config key is set. Periodt. πŸ’–
  • -j, --json β€” writes lock info as JSON to STDOUT if the command exits successfully. It’s intended for interoperation with external tools. If the command returns with a non-zero exit code, plain text messages will be sent to STDERR. That’s the vibe check. ✨

🌈 SEE ALSO 🌈

Part of the git-lfs(1) suite. 🫢


Signed off from the git-lfs(1) suite β€” page GIT-LFS-LOCK(1), with no separate version/date line on this one. That’s the footer tea, bestie πŸ’–πŸŽ€

πŸ“¦ where this page comes from