gitignore/README.md

51 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2022-10-21 01:03:53 +02:00
# Git ignore (kignore)
2022-10-20 23:43:33 +02: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-21 01:03:53 +02:00
$ kignore 'node_modules/'
2022-10-21 00:25:14 +02:00
found .gitignore .../some-path/.gitignore
2022-10-20 23:43:33 +02:00
Added node_modules/ to .gitignore
2022-10-21 00:25:14 +02:00
Removed node_modules/ from git index
```
2022-10-20 23:43:33 +02:00
2022-10-21 00:25:14 +02: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 23:43:33 +02:00
```
2022-10-21 00:26:35 +02:00
## Installation
### Cargo
2022-10-21 01:03:53 +02:00
Cargo will only pull the `kignore` command and won't add a subcommand to `git.
2022-10-21 00:26:35 +02:00
```bash
2022-10-21 01:04:45 +02:00
$ cargo install kignore
2022-10-21 00:26:35 +02:00
```
2022-10-21 01:10:15 +02: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-21 00:26:35 +02:00
### Homebrew
2022-10-21 01:50:06 +02:00
Added in HomebrewFormula
2022-10-21 02:48:58 +02:00
```bash
$ brew tap kjuulh/gitignore https://github.com/kjuulh/gitignore
$ brew install kjuulh/gitignore/kignore-bin
```