0
1

More than 3 years have passed since last update.

.gitignore をコマンドで作成する[gibo]

Last updated at Posted at 2020-10-23

.gitignore をコマンドで作成する

環境

ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G14033

gibo

giboのGitHub

インストール例

$ 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対象はしっかりと把握して作業をしたいと考えたため、テンプレートを指定し実行する方法を選択した。
今後の作業を進め、使用感を見極めたいと思う。

References

デフォルトの .gitignore を使用する方法
Mac OSバージョンを確認するコマンド

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1