IOS builds a project filtering mechanism--adds ignore files to the project. Gitignore

Source: Internet
Author: User

Currently iOS projects mainly ignore temporary files, configuration files, or generate files, and so on different development side these files will be very different, if git Add. Pushing these files to the remote will cause frequent changes and commits on different development sides. Steps:

1. Under the project catalog

2. Touch. Gitignore//Generate. gitignore Files in Directory

3. Open. Gitignore//opening. Gitignore (TXT) file

4. Write Ignore Directory

4.1 iOS projects here, usingCocospodsThe Framework management tool generatesPodfile、Podfile.lock、PodsFolders, and. XcworkspaceFour. which

above except Podfile, the other three files are not required to be submitted.
"Where PodsThere is no need to submit the directory, the documents are based on PodfileDescribes the library-dependent configuration information that is downloaded and generated by the file.
Because CocoaPodsThe semantic version number is supported, so you need to Podfile.lockThe file remembers the version that is currently in use, and of course this file is not required. However, the benefit of submitting this is that you can remind people inside the team that the library version has been updated. "(1) We now configure settings to ignore the dependent library cache directory pods/ Omit the directory as follows:
#CocoaPodsPods
# xcode## Gitignore contributors:remember to update Global/xcode.gitignore, Objective-c.gitignore &swift.gitignore# Mac OS X Finder and whatnot. ds_store## Build Generatedbuild/Deriveddata/# # Various Settings*. Pbxuser!default. Pbxuser*. Mode1v3!default. Mode1v3*. Mode2v3!default. Mode2v3*. Perspectivev3!default. Perspectivev3xcuserdata/# # Other*.moved-aside*. Xcuserstate*. xccheckout## OBJ-c/Swift Specific*. Hmap*. IPA*. Dsym.zip*.dsym

(1) and (2) put together to form my. gitignore file

(3) But if you need to ignore the file conception exists in the far end, then you need to delete the files in the far end to be able to:

Pods //To delete

Git rm–cached the file. Ds_store is removed from the GIT index library, but to the file. The ds_store itself does not do anything, that is, local or there is a. ds_store file, but the far end has no

So that you don't have to worry about this file conflict anymore.

Reference 1. HTTP://WWW.CNBLOGS.COM/SHAYEBLOG/P/5359849.HTML2. https://segmentfault.com/q/1010000003041610

IOS builds a project filtering mechanism--adds ignore files to the project. Gitignore

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.