. Gitignore Failure Problem Resolution

Source: Internet
Author: User

. Gitignore Failure Background:

A new project was created on the local Mac using unity, and a commit is initialized with GIT init to initialize the project to the repository. Then, join the. gitignore file and commit again. Then submit the entire warehouse to GitHub.

From the win clone Repository, use Unity to modify the project and discover that files ignored in the. gitignore file are tracked, that is, the. gitignore file "fails".

Reason:

The. gitignore file is cached, at the time of the first commit, all the files are on track and the second commit is added. Gitignore is already late, so it appears to be "dead".

Workaround:

Can clear the cache, this is more troublesome.

The easy way is to delete all the files involved in the. Gitignore in the project folder, then commit and push to remote. In this way, the changes to these files will no longer be track.

Experience:

Before Git init, prepare the. gitignore file in the project, and let the. gitignore file initialize with the project, submitting only the Critical Items section, which ensures that the. Gitignore is valid and the warehouse is clean.

. Gitignore Failure Problem Resolution

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.