# git lock > 锁定 Git 仓库中的文件,以防被提交修改。 > 这是 `git-extras` 的一部分。另请参阅 `git-unlock`。 > 更多信息:。 - 禁用提交本地文件更改的能力: `git lock {{path/to/file}}`