How to add .gitignore file in Xcode

To add any file in Xcode, go to the menu and navigate to menu File → New → File

For a .gitignore file choose Other → Empty and click on Next. Type in the name (.gitignore) into the Save As field and click Create.

For files starting with a dot (“.”) a warning message will pop up, telling you that the file will be hidden. Just click on Use “.” to proceed…

That’s all.

To fill your brand new .gitignore you can find an example for ignoring Xcode file here: Git ignore file for Xcode projects

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s