.gitignore をコマンドで作成する
環境
ProductName: Mac OS X
ProductVersion: 10.13.6
BuildVersion: 17G14033
gibo
インストール例
$ brew install gibo
使い方例
$ gibo dump Node >> .gitignore
上記Nodeはboilerplates、下記で自分の要件にあったものを指定し実行
$ gibo list
悪い例 dumpではboilerplates(テンプレートみたいなもの)を指定しないとこうなる。
$ gibo dump >> .gitignore
Fetches gitignore boilerplates from https://github.com/github/gitignore
gitignoreのテンプレート
おそらくlistの情報と一緒、好きなの選んで指定する。
調べた理由
いつもプロジェクト新規作成時にnode_modulesをignoreするのがめんどくさかったから。
$ git st
On branch init
Untracked files:
(use "git add <file>..." to include in what will be committed)
node_modules/
package-lock.json
package.json
nothing added to commit but untracked files present (use "git add" to track)
コメント
Global環境下に.gitignoreのテンプレートを作成するのも考えたが、
これから要件が異なることがあると考えたこと、ignore対象はしっかりと把握して作業をしたいと考えたため、テンプレートを指定し実行する方法を選択した。
今後の作業を進め、使用感を見極めたいと思う。