Git ignores features of special files

Source: Internet
Author: User

Sometimes you have to put some files in the GIT working directory. However, they cannot be submitted, such as a configuration file that holds the password for a database, and each git status will

Show "untracked files", if you have obsessive-compulsive disorder in your heart must be uncomfortable.

Git is a human tool, and the problem is to provide a solution. Create a special. gitignore file in the root directory of the Git workspace, then fill in the ignored file name,

Git will automatically ignore these files.

No need to write from scratch. Gitignore file. GitHub has prepared a variety of configuration files for us, only a combination to use, all the configuration files can be directly browsed:

Https://github.com/github/gitignore

The principle of ignoring files is:

  1. Ignore files that are automatically generated by the operating system
  2. Ignore compile-generated intermediate file, executable file
  3. Ignore your own files with sensitive information

Git ignores features of special files

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.