I added a git ignore file to my Xcode project with the following commands: touch .gitignore
then open .gitignore
and copy and pasted this into the git ignore content (and uncommented the line that had Pods/
line) and saved the file.
But when I still try to commit (have already committed numerous times) in Xcode, the Pods file is still there and already checked to commit.
How can I have my Pod file not be checked and have the git ignore work with my Xcode project?
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!
If you want to maintain a folder and not the files inside it, just put a ". gitignore" file in the folder with "*" as the content. This file will make Git ignore all content from the repository.
This question is generic to how git works. Since you've already committed the Pods/
directory, you'll want to first make a commit that removes them. You can title this commit "Remove Pods". Do not edit the .gitignore
file in this commit or else the delete will not be respected.
After you've made that commit, add the .gitignore
file with the Pods/
line uncommented and make another commit title say "Add .gitignore file".
From now on, changes to the Pods/
directory will not be checked in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With