# 使用 Homebrew, Nix 安装 gitwatch

查看 gitwatch 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:gitwatch
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gitwatch
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#gitwatch
```

  证据: nixpkgs package indexes: pkgs/by-name/gi/gitwatch/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:gitwatch
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gitwatch>
- **版本:** 0.6
- **来源摘要:** Watch a file or folder and automatically commit changes to a git repo easily
- **主页:** <https://github.com/gitwatch/gitwatch>
- **仓库:** <https://github.com/gitwatch/gitwatch>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://github.com/gitwatch/gitwatch/archive/refs/tags/v0.6.tar.gz>
- **最后更新:** 2026-06-18T09:25:51+09:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gitwatch (cli)
- gitwatch (别名)

## 依赖

- coreutils
- fswatch

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.6
- 管理器更新时间: 2026-06-18
- 本地数据: OK
- 上游仓库: https://github.com/gitwatch/gitwatch
- 检测到的最新版本: v0.6 (当前)
## 项目历史与用法

gitwatch is a small shell-script utility that watches a file or directory and automatically commits changes to an existing Git repository. Its history is the history of a practical automation wrapper: file-system notifications, a short delay, git add, git commit, and optional push.

### 项目历史

The gitwatch repository was created on GitHub in 2012 and kept the project's scope deliberately small. The official README describes it as a Bash script for watching a file or folder and committing changes to a Git repository.

Over time, the project added packaging and operating-system conveniences around that script. The README documents installation from source, bpkg, Arch AUR, NixOS, Docker, and user services for SysVInit and systemd, while keeping the central behavior as a long-running watch loop.

### 采用历史

gitwatch attracted users who wanted automatic history for files that are not normally managed through explicit Git commits. The README names configuration files and document files as examples, especially when an application writes changes without a clear save or apply workflow.

Package metadata in this batch shows Homebrew and Nix packaging, and the README documents additional community distribution through AUR and Docker. That is modest but real adoption for a niche automation script.

### 使用方式

Practitioners run gitwatch against a file or directory that already belongs to a Git repository. On Linux it uses inotifywait; on macOS the README points users to fswatch and coreutils through Homebrew.

A typical use is personal or small-team backup of frequently edited notes, dotfiles, or generated configuration. gitwatch waits briefly after a change to avoid racing partial writes, commits the changed file or directory contents, and can push to a remote when configured.

### 为什么软件包爱好者会关心

gitwatch is package-nerd interesting because it is tiny Unix automation rather than a platform. It exposes Git as a low-friction append-only history mechanism for arbitrary local state.

The tool also illustrates the tradeoff that packagers like: one shell script plus standard utilities can cover a workflow that would otherwise invite a daemon, database, or bespoke sync service.

### 时间线

- 2012: The gitwatch repository is created on GitHub.
- 2020: The v0.1 tag appears in the repository tag history.
- 2021: The README table of contents records active documentation work around installation and service usage.
- 2024: NixOS module instructions are documented for service-style deployments.

### Related projects

- Git provides the repository and commit machinery used by gitwatch.
- inotify-tools provides the inotifywait watcher used on Linux.
- fswatch and GNU coreutils are documented as macOS requirements.
- systemd, SysVInit, Docker, bpkg, AUR, and NixOS are documented deployment surfaces.

### 来源

- <https://api.github.com/repos/gitwatch/gitwatch>
- <https://formulae.brew.sh/formula/gitwatch>
- <https://github.com/gitwatch/gitwatch>
- <https://raw.githubusercontent.com/gitwatch/gitwatch/master/README.md>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gitwatch
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - gitwatch: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/gitwatch/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Archive and compression packages](https://pkg.so/zh-hans/archive-compression-tools/) - Matched archive or compression metadata.
- [coreutils](https://pkg.so/zh-hans/brew/coreutils/) - Runtime dependency declared by Homebrew.
- [fswatch](https://pkg.so/zh-hans/brew/fswatch/) - Runtime dependency declared by Homebrew.
- [gh](https://pkg.so/zh-hans/brew/gh/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git.
- [lefthook](https://pkg.so/zh-hans/brew/lefthook/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git.
- [ghorg](https://pkg.so/zh-hans/brew/ghorg/) - Shares pkgdb curated category or tags: backup, cli, developer-tools, git.
- [gitup](https://pkg.so/zh-hans/brew/gitup/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git.
- [mani](https://pkg.so/zh-hans/brew/mani/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git.
- [all-repos](https://pkg.so/zh-hans/brew/all-repos/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git.
- [git-xargs](https://pkg.so/zh-hans/brew/git-xargs/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git.
- [gickup](https://pkg.so/zh-hans/brew/gickup/) - Shares pkgdb curated category or tags: backup, cli, developer-tools, git.
- [doubledown](https://pkg.so/zh-hans/brew/doubledown/) - Local package facts share a topical domain. Shared terms: changes, cli, developer, developer-tools, file.

## Combined YAML source

View the package source record on GitHub. [combined/gitwatch.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gitwatch.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
