← 返回命令列表

Linux command

gitwatch 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Watch directory and auto-commit

gitwatch [path]

Watch with custom message

gitwatch -m "[Auto commit]" [path]

Watch and push

gitwatch -r [remote] -b [branch] [path]

Watch specific branch

gitwatch -b [branch] [path]

说明

gitwatch watches a directory and automatically commits changes whenever files are modified. It uses inotify (on Linux) to detect file changes in real time. The tool is useful for automatic version control of notes, configuration files, or any directory where you want every change tracked without manual commits.

参数

-m _message_
Commit message.
-r _remote_
Remote to push to.
-b _branch_
Branch name.
-d _seconds_
Delay before commit.
-l _length_
Commit message length.

FAQ

What is the gitwatch command used for?

gitwatch watches a directory and automatically commits changes whenever files are modified. It uses inotify (on Linux) to detect file changes in real time. The tool is useful for automatic version control of notes, configuration files, or any directory where you want every change tracked without manual commits.

How do I run a basic gitwatch example?

Run `gitwatch [path]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -m _message_ do in gitwatch?

Commit message.