I am very new to Git and am trying to use a .gitignore file. I have an Xcode project which includes many CocoaPods and Nodejs modules. I want all these files to be ignored, but I'm not sure how to create a .gitignore file and how to specify which files to ignore. Somebody please help.
Asked
Active
Viewed 199 times
1 Answers
0
First, you can simply copy a .gitignore file from gitignore.io:
https://www.gitignore.io/api/xcode
Second, make sure those files were not already added to the index.
Do a git check-ignore -v -- a/file/I/want/ignored
: if it returns nothing, then remove it from the index (git rm --cached a/file/I/want/ignored
) and try again.

VonC
- 1,262,500
- 529
- 4,410
- 5,250