{"id":13512346,"url":"https://github.com/sondr3/git-ignore","last_synced_at":"2025-04-12T19:47:49.930Z","repository":{"id":33277189,"uuid":"156286262","full_name":"sondr3/git-ignore","owner":"sondr3","description":"Quickly and easily list, fetch and generate .gitignore templates","archived":false,"fork":false,"pushed_at":"2025-03-08T18:25:40.000Z","size":253,"stargazers_count":99,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T19:47:37.660Z","etag":null,"topics":["git","rust","small-tools","utilities"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sondr3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-05T21:34:53.000Z","updated_at":"2025-03-12T10:56:20.000Z","dependencies_parsed_at":"2024-06-04T18:02:28.359Z","dependency_job_id":"ed518eac-4d67-4c0d-b632-35300ff6099a","html_url":"https://github.com/sondr3/git-ignore","commit_stats":{"total_commits":141,"total_committers":5,"mean_commits":28.2,"dds":0.475177304964539,"last_synced_commit":"39b4eac9cd0a877be2940d578e69f38ee27dc061"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgit-ignore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgit-ignore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgit-ignore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgit-ignore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sondr3","download_url":"https://codeload.github.com/sondr3/git-ignore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","rust","small-tools","utilities"],"created_at":"2024-08-01T03:01:45.255Z","updated_at":"2025-04-12T19:47:49.896Z","avatar_url":"https://github.com/sondr3.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003egit-ignore\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/sondr3/git-ignore/actions\"\u003e\u003cimg alt=\"GitHub Actions Status\" src=\"https://github.com/sondr3/git-ignore/workflows/pipeline/badge.svg\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/git-ignore-generator\"\u003e\u003cimg alt=\"Crates\" src=\"https://img.shields.io/crates/v/git-ignore-generator.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eCreate .gitignores with templates from www.gitignore.io, your own aliases and templates\u003c/b\u003e\n\u003c/p\u003e\n\n- **Simple**: `git ignore node` to print the `node` template.\n- **Offline first**: Automatically caches templates for offline support.\n- **Aliases, templates**: Create aliases for commonly combined templates, or make your own custom ones.\n- **Magic**: Automatically generate your `.gitignore` by matching common files against templates.\n\n\u003cdetails\u003e\n\u003csummary\u003eTable of Contents\u003c/summary\u003e\n\u003cbr /\u003e\n\n- [What and why](#what-and-why)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Aliases](#aliases)\n  - [Templates](#templates)\n  - [Configuration](#configuration)\n- [License](#license)\n\u003c/details\u003e\n\n# What and why\n\nTired of visiting [gitignore.io](https://www.gitignore.io/) to get templates for your\n`.gitignore` all the time? I was. So I [automated](https://xkcd.com/1319/) [it](https://xkcd.com/1205/).\n\n`git ignore` allows you to easily and quickly get all the available templates from\n[gitignore.io](https://www.gitignore.io/), even while offline. You can also define\nyour own aliases for common combinations of templates, or create your own completely\ncustom ones for even more power.\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\n[![asciicast](https://asciinema.org/a/454912.svg)](https://asciinema.org/a/454912)\n\n\u003c/details\u003e\n\n# Installation\n\nCurrently, the package is available a couple of places, including Homebrew, AUR and Nix.\n\n\u003cdl\u003e\n  \u003cdt\u003eCargo\u003c/dt\u003e\n  \u003cdd\u003e\u003ccode\u003ecargo install git-ignore-generator\u003c/code\u003e\u003c/dd\u003e\n\n  \u003cdt\u003eNix\u003c/dt\u003e\n  \u003cdd\u003e\u003ccode\u003enix-env -iA nixpkgs.gitAndTools.git-ignore\u003c/code\u003e\u003c/dd\u003e\n\n  \u003cdt\u003eHomebrew\u003c/dt\u003e\n  \u003cdd\u003e\u003ccode\u003ebrew install git-ignore\u003c/code\u003e\u003c/dd\u003e\n\n  \u003cdt\u003eArch (replace \u003ccode\u003eparu\u003c/code\u003e with you favorite AUR tool)\u003c/dt\u003e\n  \u003cdd\u003e\u003ccode\u003eparu git-ignore-bin\u003c/code\u003e\u003c/dd\u003e\n  \u003cdd\u003e\u003ccode\u003eparu git-ignore\u003c/code\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\n## Release pages\n\nYou can also download the matching release from the [release\ntab](https://github.com/sondr3/git-ignore/releases), extracting the archive and\nplacing the binary in your `$PATH`. Note that for Linux the\n`unknown-linux-musl.tar.gz` is preferred as it is statically linked and thus\nshould run on any Linux distribution.\n\n# Usage\n\n**NOTE:** Similar to the `nix-search` command, this program prints a message\nto `stderr` about using cached results. This does _not_ interfere with piping\nand is purely informational. You can also optionally use `--write` to automatically\nwrite the resulting ignores to `$CWD/.gitignore` instead of piping.\n\n## Updating templates\n\nTo download and cache all available templates, use `--update`. This can also be\nused in combination with any of the other flags/arguments, or be run as a\nstandalone flag.\n\n```sh\n$ git ignore -u\nInfo: Update successful\n```\n\n## Automatic matching\n\nBy matching against project or language specific files and extensions you can have\nyour `.gitignore` automatically generated for you. Do you have a `package.json` and\n`Cargo.toml` in the current directory? `--auto` will automatically add `node` and `rust`\nto the template output.\n\n```sh\n$ git ignore -a\n\n### Created by https://www.gitignore.io\n### Rust ###\n\n[...]\n\n# These are backup files generated by rustfmt\n**/*.rs.bk\n```\n\n## List templates\n\nTo list all the available templates:\n\n```sh\n$ git ignore --list\n  1c\n  1c-bitrix\n  a-frame\n  actionscript\n  ada\n  [...]\n  zukencr8000\n```\n\nThe `--list` option is also used to search for templates matching your input. The\nmatching is done by doing `template.contains(phrase)`, so searching for `intellij`\nwill list all templates containing that phrase. You can also search for multiple\ntemplates at once:\n\n```sh\n$ git ignore -l rust intellij\n\n  intellij\n  intellij+all\n  intellij+iml\n  rust\n```\n\n## Printing templates\n\nOnce you've found your templates, you can print them by omitting `-l|--list`. **Note:**\nlisting and searching for templates is inexact, but printing them requires exact matches.\n\n```sh\n$ git ignore rust intellij+all\n\n### Created by https://www.gitignore.io\n### Rust ###\n\n[...]\n\n# These are backup files generated by rustfmt\n**/*.rs.bk\n```\n\n## Aliases\n\nAliases are a way to combine common combinations of templates, if you find\nyourself always using `node` and `visualstudiocode` in your frontend projects\nyou can create an alias for it for ease of access. Aliases have higher priority\nthan templates from www.gitignore.io, so an alias named `node` will be used\ninstead of the template. When listing all available templates, aliases are colored\nyellow to allow you to distinguish them from regular templates.\n\n### Listing\n\n```sh\n$ git ignore alias list\nAvailable aliases:\nnode =\u003e [\"node\", \"nextjs\", \"visualstudiocode\"]\nrust =\u003e [\"rust\", \"intellij+all\"]\n```\n\n### Adding\n\n```sh\n$ git ignore alias add node node nextjs visualstudiocode\nCreated alias node for [\"node\", \"nextjs\", \"visualstudiocode\"]\n```\n\n### Removing\n\n```sh\n$ git ignore alias remove node\nRemoved alias node\n```\n\n## Templates\n\nTemplates are custom templates created by you for things that do not have an\nexisting template defined. When listing and searching templates has the highest\npriority (`templates \u003e alias \u003e normal`). Templates are listed with a blue color\nto distinguish them from aliases and normal templates.\n\n### Listing\n\nThe file name is the name of the file in `$HOME/.config/git-ignore/templates`.\n\n```sh\n$ git ignore template list\nAvailable templates:\ndocs =\u003e \"docs.txt\"\n```\n\n### Adding\n\nAll templates are created in `$HOME/.config/git-ignore/templates`. So the name\nyou give for the file is the filename that is used in this directory.\n\n```sh\n$ git ignore template add docs docs.txt\nCreated template docs at ~/.config/git-config/templates/docs.txt\n```\n\n### Removing\n\n```sh\n$ git ignore template remove node\nRemoved template node\n```\n\n## Configuration\n\nYou can create the configuration file and directories by running `git ignore init`. This\nwill create `$HOME/.config/git-ignore/config.toml` and `$HOME/.config/git-ignore/templates/`.\n\nThe config file is a simple [TOML](https://toml.io/en/) file:\n\n```toml\n[aliases]\nnode = [\n    'node',\n    'nextjs',\n    'visualstudiocode',\n]\n\n[templates]\ndocs = 'docs.txt'\n```\n\n## Completion\n\nIf your method of installation didn't include shell completion, you can manually\nsource or save them with the `git ignore completion \u003cshell\u003e` command.\n\n## Help\n\nFinally, help is always available with `git ignore help`/`git ignore -h` (or `--help` if your installation\nincluded man pages).\n\n# LICENSE\n\nGPLv3+.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsondr3%2Fgit-ignore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsondr3%2Fgit-ignore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsondr3%2Fgit-ignore/lists"}