Skip to content
项目

关于

🕔 将开发文件排除在 Time Machine 备份之外。

系统与基础设施

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

tmignore

Time Machine on macOS is a highly useful tool for creating backups of all your files. Unfortunately for developers, it also backs up your coding project's dependencies, build output and other undesired files, which slows down the backup process and takes up storage.

tmignore excludes files and directories matched by .gitignore files from future Time Machine backups.

Install

macOS 10.13+ is required to run tmignore.

  1. Build and install the script using Homebrew (Xcode is required):

    brew install samuelmeuli/tap/tmignore
    
  2. If you want to run the script once:

    tmignore run
    

    To schedule the script to run once a day:

    brew services start tmignore
    

Alternatively, if you don't want to build the binary yourself, you can download the compiled program on the Releases page.

Commands

  • run: Searches the disk for files/directories ignored by Git and excludes them from future Time Machine backups
  • list: Lists all files/directories that have been excluded by tmignore
  • reset: Removes all backup exclusions that were made using tmignore

Configuration

You can configure the behavior of tmignore by creating a configuration file at ~/.config/tmignore/config.json:

  • "searchPaths": Directories which should be scanned for Git repositories. Default: ["~"] (home directory)

  • "ignoredPaths": Directories which should be excluded from the Git repository search. Default: ["~/.Trash", "~/Applications", "~/Downloads", "~/Library", "~/Music/iTunes", "~/Music/Music", "~/Pictures/Photos\\ Library.photoslibrary"]

  • "whitelist": Files/directories which should be included in backups, even if they are matched by a .gitignore file. Useful e.g. for configuration or password files. Default: []

Configuration example:

{
	"searchPaths": ["~", "/path/to/another/drive"],
	"whitelist": ["*/application.yml", "*/config.json", "*/.env.*"]
}

Contributing

Suggestions and contributions are always welcome! Please discuss larger changes via issue before submitting a pull request.

探索相关项目

加载中…