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以外でコミットしないファイルを設定する

Last updated at Posted at 2019-12-20

what

  • .gitignore以外でコミットしないファイルを設定する方法を記載する

why

  • よく忘れて調べてしまうため、個人メモ
  • 公式ドキュメントにも載っていたりする

how

  • リポジトリ内の.git/info/exclude ファイルにコミットしたくないファイル名を追加する

記入例

 git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
hogehoge-lock.json
hogefile
hogefile.lock
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?