zoukankan      html  css  js  c++  java
  • .gitignore 只包含几个文件

    ##去除哪些路径 
    /*
    ## 保留哪些文件
    !my.cnf   //          
    

    学习其他的

    *
    !/**/
    ##去除哪些路径
    /dirignore1/
    /dirignore2/
    ##只包含哪些结尾的文件
    !*.c
    !*.h
    !*.cpp
    !*.sh
    !*.xml
    !*.py
    !*.md
    !*.jar
    !.scala
    !.java
    

    1 * 代表忽略全部

    2 /** 代表文件夹下的全部内容 ( A trailing "/" matches everything inside. For example, "abc/" matches all files inside directory "abc")

    为什么要写这句,因为不可能包含一个文件,如果他的文件夹都被忽略了 It is not possible to re-include a file if a parent directory of that file is excluded. (*)

    3 包含每个文件后,/dirignore1/, 在去除不需要的文件夹。(可以注意到.gitignore是按照顺序读入规则的,顺序重要)

    4 ! 在每行前加感叹号,表示需要包括后面的匹配文件或文件夹

    5 /, 连续两个* 表示包含文件夹下的所有内容 (A trailing "/" matches everything inside. For example, "abc/**" matches all files inside directory "abc")

    6 (只有在没有 “/” 符号的前提下 , 才会作wildcard匹配, 所以模版中不能加"/"这种路径操作) If the pattern does not contain a slash /, Git treats it as a shell glob pattern and checks for a match against the pathname relative to the location of the .gitignore file

    原文链接:https://blog.csdn.net/u011467621/article/details/79108980

    写入自己的博客中才能记得长久
  • 相关阅读:
    oracle lpad函数和rpad函数
    OREACLE SUBSTR()函数应用-截取字符函数
    oracle常用数值函数
    Oracle 分析函数row_number() over (partition by order by )
    oracle中decode函数用法
    oracle数据字典信息整理
    python学习遇到的英文词汇
    读书随想
    常用css列表
    爬虫趣事
  • 原文地址:https://www.cnblogs.com/heris/p/15687996.html
Copyright © 2011-2022 走看看