gitignore/README.md

49 lines
1.1 KiB
Markdown
Raw 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
$ cargo binstall kignore # binstall will warn that git.front.kjuulh.io isn't a valid repo, it is still installable though
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
2022-10-21 01:10:15 +02:00
```
# zsh
eval "kignore init zsh"
2022-10-21 01:10:15 +02:00
# shell
eval "kignore init sh"
2022-10-21 00:26:35 +02:00
# bash
eval "kignore init bash"
2022-10-21 02:48:58 +02:00
```