[Git] .gitignore_global の設定と gibo による .gitignore の生成

また調べていたので memo.

[markdown]
* プロジェクト内で git 管理から外したい対象は、.gitignore で管理する。
* ~/.gitignore_global で管理すると、端末上のすべての git に共通の管理ルールを設定できる。

> [Ignoring files – User Documentation](https://help.github.com/articles/ignoring-files/)

## .gitignore_global

gitignore ファイルのひな型はこちらを参考に。
必要に応じて `*~` や `*.idea` などを追加する。

> [Some common .gitignore configurations](https://gist.github.com/octocat/9257657)
~/.gitignore_global の作成が終わったら、下記を実行して有効化する。

“`prettyprinted
% git config –global core.excludesfile ~/.gitignore_global
“`

## gibo

gibo で .gitignore を生成できる。

> * [simonwhitaker/gibo: A shell script for easily accessing gitignore boilerplates](https://github.com/simonwhitaker/gibo)

“`prettyprinted
% brew install gibo
% gibo -h
gibo 1.0.4 by Simon Whitaker
https://github.com/simonwhitaker/gibo
Fetches gitignore boilerplates from github.com/github/gitignore
Usage:
gibo [options]
gibo [boilerplate boilerplate…]
Example:
gibo Python TextMate >> .gitignore
Options:
-l, –list List available boilerplates
-u, –upgrade Upgrade list of available boilerplates
-h, –help Display this help text
-v, –version Display current script version
“`

## 補遺

> * [Bitbucket: gitリポジトリの作成 -> push -> SourceTreeへの登録まで | deadwood](https://www.d-wood.com/blog/2013/05/17_3653.html)
[/markdown]