LoginSignup
0
0

More than 3 years have passed since last update.

Macのgitignoreで、簡単にUserInterfaceState.xcuserstateを差分としない方法

Last updated at Posted at 2018-12-18

今回の方法は、既にプロジェクトがある場合に、UserInterfaceState.xcuserstateを差分としない方法です。

所定のリポジトリで、Macのターミナル操作

touch .gitignore

続けて

vi .gitignore

iを押して、編集モード

.DS_Store
*.swp
UserInterfaceState.xcuserstate

:wqで閉じる。コミットしてgitignoreをpush後

UserInterfaceState.xcuserstateがある一つ上の階層をshow in Finderでファイルをターミナルにドラッグ&ドロップしてEnter

git rm --cached  ファイルをドラッグ&ドロップするとPathが自動で記載されます。

続けてEnter

git commit -m "removed cache."

push

これで毎回差分として、出現するUserInterfaceState.xcuserstateが出現しなくなります。

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