How to add .gitignore file into Xcode project

后端 未结 2 1257
陌清茗
陌清茗 2020-12-14 15:08

When making sure that iPhone project could be installed as an exact copy into a brand new computer via version control (git), I just realized that .gitignore

相关标签:
2条回答
  • 2020-12-14 16:00
    1. When the open panel is showing, press Command-Shift-. and the hidden files will appear, including .gitignore.
    2. Select the .gitignore file and press the Add button.

    This works in any app, not just Xcode. It's an obscure feature of NSOpenPanel.

    0 讨论(0)
  • 2020-12-14 16:02

    This solution didn't work for me in XCode 8.0 and El Capitan.

    I opened a terminal and typed:

    defaults write com.apple.finder AppleShowAllFiles YES
    cd ../PATH_TO_GIT_ROOT 
    touch .gitignore
    

    Then relaunched Finder and my .gitignore file was visible. Edit per .gitignore documentation

    0 讨论(0)
提交回复
热议问题