0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

.gitignoreに書くべき物n選

0
Posted at

個人的メモです。随時更新(かも)

テンプレート

.gitignore
*.env
*.pem
*.key
*.exe

# DB使うなら
*.sqlite3
*.sql

.vs/
.vscode/
.idea/
bin/
obj/

# Python使うなら
__pycache__/

# Node.js使うなら
node_modules/

*.env

義務教育。代わりに.env.exampleを上げると良いらしい。以下のようにキーだけ書いてバリューは書いてないファイル。

.env.example
API_KEY=
TOKEN=

*.pem, *.key

これをコミットする人はインポスターなので可及的速やかに吊りましょう。

DB関連ファイル

  • *.sqlite3
  • *.sql

これもインポスター候補です。

IDE関連フォルダ

  • .vs/
  • .vscode/
  • .idea/
  • bin/
  • obj/

これらは各人の環境でIDEが勝手に作るもので、中にはビルドキャッシュが入ってる物もあり普通にビルドの邪魔なので共有すべきでない。

バイナリファイル

バイナリファイルはgitだと差分が見づらいため、gitで管理するものではない。
特に*.exe等の実行ファイルは上げるとしたらReleasesの方に。

*.pngや*.wavなどのアセット類も直接コミットしないのが望ましい。詳しくはgit LFSで検索。

node_modules/

サイバーテロです。

__pycache__/

Python使うなら必要。このフォルダは要りません。というかキャッシュと名が付いてる物は全部要りません。他人のビルドなんて信用できない(?)

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?