Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in DevOps and Agile by (29.3k points)
edited by

I need to add some rules to my .gitignore file, however, I can't find it in my project folder. Isn't it created automatically by Xcode? If not, what command allows me to create one?

1 Answer

+1 vote
by (50.2k points)

To create a gitignore file follow the below steps:

First, create a text file gitignore.txt. Then open the text file in a text editor and add rules to it and save the file. Then press SHIFT+RIGHT_CLICK on the folder then open the command window here. There you need to rename the file in the command line using

ren gitignore.txt .gitignore

Alternatively, 

You can get around this Windows Explorer error by appending a dot to the filename without extension: .gitignore. Then it will automatically be changed to .gitignore.

Thus you can create a .gitignore file.

Browse Categories

...