How to gracefully ignore some unnecessary files using git

Source: Internet
Author: User

Familiar with git found that using sourcetree to manage and develop projects will become more efficient, and now I use bitbucket to manage their own projects, it provides a private warehouse, it is still relatively cool, but when the first use, as long as the opening of the Local warehouse project, Will modify a buffer file, and then in the Sourcetree very smart prompt project changes, but the right button ignore file, but later found this too not elegant, each project to right-click N multiple files, thinking that there will be an elegant way to solve. So various toss ... Finally find a solution.

The first step is to find one. gitignore_global configuration file, use Ls-all in the ~/directory to find this file, then VI. Gitignore_global Open it, add the following code, and then wq the item back in.

# Xcode#build/*. Pbxuser!default. Pbxuser*. Mode1v3!default. Mode1v3*. Mode2v3!default. Mode2v3*. Perspectivev3!default. Perspectivev3xcuserdata*. Xccheckout*.moved-Asidederiveddata*. Hmap*. IPA*. xcuserstate# cocoapods## We recommend against adding the Pods directory to your. Gitignore. however# You should Judge foryourself, the pros and cons are mentioned at:# http://Guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control# # Pods/

If this file is not found in the ~/directory. Gitignore_global, see this link for details: https://help.github.com/articles/ignoring-files/

GitHub ignores file original address: Https://github.com/github/gitignore/blob/master/Objective-C.gitignore

Gitignore:https://github.com/github/gitignore in all development environments

Here are explanations for ignoring the file: https://gist.github.com/adamgit/3786883

There are some people here who ask questions. Chinese website: http://segmentfault.com/q/1010000000257971

How to gracefully ignore some unnecessary files using git

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.