Linux command
git-lock 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Lock a file
git lock [file.psd]
Lock multiple files
git lock [file1.psd] [file2.psd]
说明
git lock marks files as locked in git-extras. It adds files to a `.gitlock` file, indicating they shouldn't be modified by others. This provides advisory file locking for coordinating work on binary or non-mergeable files. The lock is advisory and tracked in the repository, requiring team cooperation to respect locks. Use `git locked` to see currently locked files and `git unlock` to release them.
参数
- --help
- Display help information.
FAQ
What is the git-lock command used for?
git lock marks files as locked in git-extras. It adds files to a `.gitlock` file, indicating they shouldn't be modified by others. This provides advisory file locking for coordinating work on binary or non-mergeable files. The lock is advisory and tracked in the repository, requiring team cooperation to respect locks. Use `git locked` to see currently locked files and `git unlock` to release them.
How do I run a basic git-lock example?
Run `git lock [file.psd]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --help do in git-lock?
Display help information.