The solution to the ineffectiveness of the .gitignore file of XZ_iOS

If you don't know how to add a .gitignore file to your project or don't know what the .gitignore file does, please move 

Details of creating projects cocoapod and gitignore for XZ_iOS

After using the above method to add before, opening in soureTree will display the picture below, indicating that the addition is successful, and the .gitignore file takes effect


However, after adding it today, the third-party library under the pod folder is still displayed in soureTree, and the third-party library will still be uploaded when uploading to Git. I thought I added it in the wrong way and deleted the .gitignore file. It is still not possible to re-add it. After re-creating the project, the operation is the same again. Open the  .gitignore file of the previous project and check it. It turns out that it was caused by #Pods/, delete  the # in front of #Pods/ :

"#" means----everything in this directory must be backed up to the server.

This was also mentioned in the article I created. I forgot about it for a long time, but I deepened my memory again today.

The #Pods/ in the latest version of the .gitignore file downloaded on GitHub  includes # by default, as shown below:


It should be like the picture below. After deleting, open soureTree again and find that it is in effect, and the result in the above picture appears.




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325918398&siteId=291194637