52
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Git でグローバルな .gitignore を作成する

Posted at

OS X で環境構築するときに忘れないように Git のグローバルな .gitignore の作成についてメモっとく。Git で Email と Username をグローバル設定するの続き。

.DS_Store はグローバルな .gitignore に追加するといいかと。

~/.config/git/ignore に設定する

$ mkdir -p ~/.config/git
$ cat <<EOF > ~/.config/git/ignore
> .DS_Store
> EOF

指定ファイル (~/.gitignore_global) に設定する

$ cat <<EOF > ~/.gitignore_global
> .DS_Store
> EOF
$ git config --global core.excludesFile ~/.gitignore_global

参考文献

52
35
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
52
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?