GitHub File Upload

Source: Internet
Author: User

Anyone who has used GitHub knows that the. gitignore file exists, but there are still some things to be aware of in actual use. Especially for new users, errors may occur if they do not pay attention to it.

I. How does GitHub selectively ignore specific files? 1. Global settings

Generally, to upload a project, a file is generated under the root directory of the project. git folder (implemented by the GIT init command), in. there is an exclude file in the GIT/INFO/folder, which describes the features of files that do not need to be uploaded to the remote end. It is generally represented by regular expressions.

The syntax of the exclude file is easy and not described.

2. Local Settings

The. Ignore file in a specific directory defines the features of files that do not need to be uploaded to the remote end. The directory and all the files that meet the features under the subdirectory will not be synchronized to the remote end .. The format of the ignore file is similar to exclude.

Ii. Notes 1. cache Problems

If the file has already been cached, it will not be affected by the above global settings and local settings. In this case, you need to execute the following command

git rm --cache
2. Ignore gitignore itself

You can also ignore yourself in. gitignore.

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.