Git uses tips to summarize

Source: Internet
Author: User

Bulk Add Command:

Git add-a    #将所有文件改动提交到暂存区git Add.       -U    #将修改和删除的文件改动提交到暂存区

Add ignored files, do add operation is not committed, there are three ways:

1. Create a new. gitignore file in the warehouse directory, which is valid for the directory in which it resides and its subdirectories. After submitting this file, other people can use this set of ignored rules.

2, first create a txt text file, such as Ignore.txt, and then execute the following command:

git config--global core.excludesfile path/ignore.txt

3, directly modify the. git/info/exclude file to add the Ignore rule.

Ignore configuration examples:

#忽略 *.a and *. b files *. [ AB] #忽略*.b and *. c files, except for a.b files *. [ BC]! a.b        #忽略abc目录和abc文件abc            #只忽略abc目录, do not ignore ABC fileABC/            #只忽略abc文件, do not ignore ABC directoryABC!abc/             #只忽略当前目录下的abc文件和目录/ABC            

Git uses tips to summarize

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.