{"id":23034506,"url":"https://github.com/r4ai/git-ignore","last_synced_at":"2026-05-17T00:04:52.132Z","repository":{"id":201203996,"uuid":"707202675","full_name":"r4ai/git-ignore","owner":"r4ai","description":"A git subcommand to generate .gitignore files.","archived":false,"fork":false,"pushed_at":"2024-04-10T08:22:08.000Z","size":2022,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-20T08:51:18.542Z","etag":null,"topics":["git","gitignore","gitignore-cli","gitignore-generator","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r4ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2023-10-19T12:28:40.000Z","updated_at":"2024-04-23T12:30:53.359Z","dependencies_parsed_at":"2023-12-27T15:26:57.427Z","dependency_job_id":"e3bcfa82-dd68-45a5-aa47-dc90df8539e0","html_url":"https://github.com/r4ai/git-ignore","commit_stats":null,"previous_names":["r4ai/git-ignore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4ai%2Fgit-ignore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4ai%2Fgit-ignore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4ai%2Fgit-ignore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4ai%2Fgit-ignore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r4ai","download_url":"https://codeload.github.com/r4ai/git-ignore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246900421,"owners_count":20852051,"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","gitignore","gitignore-cli","gitignore-generator","rust"],"created_at":"2024-12-15T16:32:31.769Z","updated_at":"2025-10-11T16:12:00.536Z","avatar_url":"https://github.com/r4ai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/assets/logo.png\" width=\"300\" /\u003e\n  \u003ch1\u003egit-ignore\u003c/h1\u003e\n  \u003cp\u003e\n    A git subcommand to generate .gitignore files.\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Features\n\n- Generate .gitignore based on the contents of the local directory. (by default, the contents of [github/gitignore](https://github.com/github/gitignore) are used)\n- Completion in Fish, Bash, Zsh\n- Works on Linux, Windows, MacOS\n\n## Installation\n\nInstall `git-ignore` with cargo:\n\n```sh\ncargo install git-ignore --git https://github.com/r4ai/git-ignore\n```\n\nAnd then, register it as a subcommand of git:\n\n```sh\nsudo git-ignore --register\n```\n\n## Usage\n\nGenerate a .gitignore file for Rust:\n\n```sh\ngit ignore rust \u003e .gitignore\n```\n\nGenerate a .gitignore file for Rust, Python, and C++:\n\n```sh\ngit ignore rust python c++ \u003e .gitignore\n```\n\n## Completion\n\n### Fish shell\n\nAdd the following line to your `~/.config/fish/config.fish`:\n\n```sh\ntest -e (git --exec-path)/git-ignore; and source (git ignore --completion fish | psub)\n```\n\nThis will enable completion for `git ignore` subcommand.\n\n### Bash\n\nAdd the following line to your `~/.bashrc`:\n\n```sh\nif [ -f \"$(git --exec-path)/git-ignore\" ]; then\n  source \u003c(git ignore --completion bash)\nfi\n```\n\nThis will enable completion for `git ignore` subcommand.\n\n### Zsh\n\nRun the following command:\n\n```sh\ngit ignore --completion zsh \u003e ~/.zsh/completions/_git-ignore\n```\n\nThis will enable completion for `git ignore` subcommand.\n\n\u003e [!WARNING]\n\u003e `~/.zsh/completions` have to be in your `$fpath`. Change this path if necessary.  \n\u003e To check if it is in your `$fpath`, run `echo $fpath`.  \n\u003e If you don't have `~/.zsh/completions`, create it and add the following line to your `~/.zshrc`:\n\u003e\n\u003e ```sh\n\u003e fpath=(~/.zsh/completions $fpath)\n\u003e ```\n\n## Configuration\n\nThis command generates `.gitignore` based on the local directory.\n\nBy default, this directory is `/home/alice/.local/share/gitignore`, where the repository at [github/gitignore](https://github.com/github/gitignore) is cloned. You can also check the path of this directory with `git ignore --repo`.\n\nTo change the path of this directory, you need to change `ignore.path` in git config.\n\n```sh\ngit config --global ignore.path /path/to/your/gitignore\n```\n\nFor example, if you want to use [toptal/gitignore](https://github.com/toptal/gitignore/) instead of [github/gitignore](https://github.com/github/gitignore), simply clone [toptal/gitignore](https://github.com/toptal/gitignore/) to `/home/alice/.local/share/gitignore`:\n\n```sh\n$ git ignore --repo \n/home/alice/.local/share/gitignore\n\n$ cd /home/alice/.local/share\n\n$ rm -rf ./gitignore\n\n$ gh repo clone toptal/gitignore\n\n```\n\n## Development\n\nClone repository:\n\n```sh\ngh repo clone r4ai/git-ignore\n```\n\nBuild and install `git-ignore` from local repositories.\n\n```sh\ncargo install --path .\n```\n\nRegister it as a subcommand of git:\n\n```sh\ngit-ignore --register\n```\n\n## LICENSE\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr4ai%2Fgit-ignore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr4ai%2Fgit-ignore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr4ai%2Fgit-ignore/lists"}