Linux command
ci 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Check in a file to RCS (removes working file)
ci [path/to/file]
Check in and keep a read-only working copy
ci -u [path/to/file]
Check in and immediately check out locked for editing
ci -l [path/to/file]
Check in with a specific revision number
ci -r[2.0] [path/to/file]
Force check-in even if no changes were made
ci -f [path/to/file]
Check in with a log message on the command line
ci -m"[Log message]" [path/to/file]
Check in with a specific state
ci -s[Exp] [path/to/file]
说明
ci (check in) deposits the contents of a working file into an RCS (Revision Control System) archive file. RCS files store all revisions of a file, enabling version tracking and history management. By default, ci removes the working file after check-in, leaving only the RCS archive. Use -u to keep a read-only copy or -l to keep a locked (editable) copy. The command prompts for a log message describing the changes. This message is stored with the revision for future reference.
参数
- -l_rev_
- Check in and immediately check out locked for continued editing.
- -u_rev_
- Check in and leave a read-only (unlocked) working copy.
- -r_rev_
- Assign specific revision number to the new revision.
- -f_rev_
- Force check-in even if file is unchanged from the previous revision.
- -m_msg_
- Use msg as the log message instead of prompting interactively.
- -n_name_
- Assign a symbolic name to the checked-in revision.
- -N_name_
- Same as -n, but overrides any existing assignment of the name.
- -s_state_
- Set the state of the checked-in revision (e.g. Exp, Stab, Rel).
- -d_date_
- Use the specified date as the check-in date instead of the current time.
- -w_login_
- Use login as the author field of the deposited revision.
- -k_rev_
- Search working file for RCS keyword values to determine the revision number, date, author, and state.
- -q_rev_
- Quiet mode; suppress diagnostic output.
- -T
- Set the RCS file's modification time to the new revision's time only if the former precedes the latter. Preserves make dependencies.
- -M_rev_
- Set the modification time of the working file (with -l or -u) to the date of the retrieved revision.
FAQ
What is the ci command used for?
ci (check in) deposits the contents of a working file into an RCS (Revision Control System) archive file. RCS files store all revisions of a file, enabling version tracking and history management. By default, ci removes the working file after check-in, leaving only the RCS archive. Use -u to keep a read-only copy or -l to keep a locked (editable) copy. The command prompts for a log message describing the changes. This message is stored with the revision for future reference.
How do I run a basic ci example?
Run `ci [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -l_rev_ do in ci?
Check in and immediately check out locked for continued editing.