Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add .gitignore file into Xcode project

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.

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?

like image 274
JOM Avatar asked Jan 25 '13 07:01

JOM


People also ask

How do I add files to Gitignore Xcode?

then Open Terminal or Git Bash for Windows and go to the file directory where you wanna create a git ignore file. 1️⃣ Create a . gitignore file for your repository. 3️⃣ Now you will see the terminal like this, then paste it!

Where do I put my .gitignore file?

gitignore file anywhere in the working directory, i.e in any folder where your code prevails. Having said that, the best practice would be to place the . gitignore file in the root directory.


1 Answers

  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.

like image 166
Kurt Revis Avatar answered Oct 05 '22 02:10

Kurt Revis