0
0

More than 1 year has passed since last update.

【Swift】.gitignoreテンプレと、反映させるコマンド

Last updated at Posted at 2021-08-22

毎回忘れるので残します


.gitignoreテンプレ

.gitignore
# Xcode (from gitignore.io)
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPod
Pods/*

# others
*.swp
!.gitkeep
.DS_Store

反映させるコマンド

.gitignore作る前にプッシュをするなどして、キャッシュにインデックスが残っている場合、下記のコマンドを実行する必要があります。

git rm -r --cached .
git add .

キャッシュ全部消してまた新しく管理対象を作り直すイメージですね

2022/12/29追記

例えば、dataフォルダを無視したいときはこんな感じでやる

/data/*
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