Add description to Commands.md for git-ignore-io

This commit is contained in:
LeeW 2015-09-07 21:41:59 +08:00
parent 4a8037fa62
commit a1d0445cc1

View file

@ -20,6 +20,7 @@
- [`git graft`](#git-graft)
- [`git alias`](#git-alias)
- [`git ignore`](#git-ignore)
- [`git ignore-io`](#git-ignore-io)
- [`git info`](#git-info)
- [`git fork`](#git-fork)
- [`git release`](#git-release)
@ -408,6 +409,54 @@ build
*.log
```
## git ignore-io
Generate sample gitignore file from [gitignore.io](https://www.gitignore.io)
Without option, `git ignore` show the sample gitignore on screen.
```bash
$ git ignore-io vim
# Created by https://www.gitignore.io/api/vim
### Vim ###
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
```
To export it to `.gitignore` file you can use the following options:
* `-a` or `--append` to append the result to `.gitignore`
* `-e` or `--export` to replace `.gitignore` with the result
```bash
$ git ignore-io vim python
```
For efficiency, `git ignore-io` store all available typess at `~/.gi_list`.
To list all the available types:
* `-l` or `-L` : These two options will show the list in different format. Just try it.
You can also search type from the list by:
* `-s <word>` or `--search <word>`
```bash
$ git ignore-io -s ja
django
jabref
java
ninja
```
## git info
Show information about the repo: