gitignore/README.md

51 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2022-10-20 23:03:53 +00:00
# Git ignore (kignore)
2022-10-20 21:43:33 +00:00
Is an extension for easily adding ignored files to `.gitignore files`, when
added it will by default also try to remove any files matching the pattern added
to .gitignore, this is by default also run in interactive mode, giving you the
option to confirm or deny
```bash
2022-10-20 23:03:53 +00:00
$ kignore 'node_modules/'
2022-10-20 22:25:14 +00:00
found .gitignore .../some-path/.gitignore
2022-10-20 21:43:33 +00:00
Added node_modules/ to .gitignore
2022-10-20 22:25:14 +00:00
Removed node_modules/ from git index
```
2022-10-20 21:43:33 +00:00
2022-10-20 22:25:14 +00:00
```bash
$ git ignore 'node_modules/'
found .gitignore .../some-path/.gitignore
Added node_modules/ to .gitignore
Removed node_modules/ from git index
2022-10-20 21:43:33 +00:00
```
2022-10-20 22:26:35 +00:00
## Installation
### Cargo
2022-10-20 23:03:53 +00:00
Cargo will only pull the `kignore` command and won't add a subcommand to `git.
2022-10-20 22:26:35 +00:00
```bash
2022-10-20 23:04:45 +00:00
$ cargo install kignore
2022-10-20 22:26:35 +00:00
```
2022-10-20 23:10:15 +00:00
#### Post install
To get the `git ignore` subcommand working you will need to have the file
git-ignore available on your path, either add it yourself using
`git-alias/git-ignore` as a template or:
```
git clone https://github.com/kjuulh/gitignore
./scripts/install-git-alias.sh # only tested on mac and linux
```
2022-10-20 22:26:35 +00:00
### Homebrew
2022-10-20 23:50:06 +00:00
Added in HomebrewFormula
2022-10-21 00:48:58 +00:00
```bash
$ brew tap kjuulh/gitignore https://github.com/kjuulh/gitignore
$ brew install kjuulh/gitignore/kignore-bin
```