如何将.gitignore文件添加到Xcode项目中 [英] How to add .gitignore file into Xcode project

查看:113
本文介绍了如何将.gitignore文件添加到Xcode项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当确保可以通过版本控制(git)将iPhone项目作为精确副本安装到全新计算机上时,我才意识到缺少 .gitignore 文件.已在版本控制下添加,但是现在想将该文件也添加到Xcode项目中,以便于查看和编辑.

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 file was missing. Added under version control, but now would like to add that file also into Xcode project for easy viewing and editing.

使用"Control-click + Add Files to myProject..."弹出菜单时,看不到以.开头的任何文件名(点).如何将.gitignore文件添加到Xcode项目中?

When using "Control-click + Add Files to myProject..." popup menu, I can't see any filenames starting with . (that's a dot). How can I add my .gitignore file into Xcode project?

推荐答案

  1. 显示打开的面板时,按Command-Shift-.,将显示隐藏的文件,包括.gitignore.
  2. 选择.gitignore文件,然后按添加"按钮.
  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.

这适用于任何应用程序,而不仅限于Xcode. 这是NSOpenPanel 的晦涩功能.

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

这篇关于如何将.gitignore文件添加到Xcode项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆