• .gitignore 过滤掉不想要提交的git文件


    # Build and Object Folders  
    bin/  
    obj/  
      
    # Nuget packages directory  
    packages/  
    
    #Logs
    logs/
    .vs/
      
    ## Ignore Visual Studio temporary files, build results, and  
    ## files generated by popular Visual Studio add-ons.  
      
    # User-specific files  
    *.suo  
    *.user  
    *.sln.docstates  
      
    # Build results  
    [Dd]ebug/  
    [Rr]elease/  
    x64/  
    *_i.c  
    *_p.c  
    *.ilk  
    *.meta  
    *.obj  
    *.pch  
    *.pdb  
    *.pgc  
    *.pgd  
    *.rsp  
    *.sbr  
    *.tlb  
    *.tli  
    *.tlh  
    *.tmp  
    *.log  
    *.vspscc  
    *.vssscc  
    .builds  
      
    # Visual C++ cache files  
    ipch/  
    *.aps  
    *.ncb  
    *.opensdf  
    *.sdf  
      
    # Visual Studio profiler  
    *.psess  
    *.vsp  
    *.vspx  
      
    # Guidance Automation Toolkit  
    *.gpState  
      
    # ReSharper is a .NET coding add-in  
    _ReSharper*  
      
    # NCrunch  
    *.ncrunch*  
    .*crunch*.local.xml  
      
    # Installshield output folder  
    [Ee]xpress  
      
    # DocProject is a documentation generator add-in  
    DocProject/buildhelp/  
    DocProject/Help  
    UpgradeLog*.XML  
      
    # Lightswitch  
    _Pvt_Extensions  
    GeneratedArtifacts  
    *.xap  
    ModelManifest.xml  
      
    #Backup file  
    *.bak
     

    关于.gitignore文件不生效的问题 首先检查该文件是否和.git文件在同一目录。然后再检查当前git目录层级是否有两个.git文件夹其他目录还有.gitignore文件。然后才是

     //git rm -r --cached .
     git add .
     git commit -m 'update .gitignore'
     git push
  • 相关阅读:
    echarts在ie浏览器y轴坐标偏移向上
    git常用命令总结[转]
    char和varchar类型的区别
    关于猴子选大王的问题
    VIM折叠代码命令
    用excel打开文本内容
    php事务操作示例
    Iframe内嵌Cookie丢失问题
    VIM折叠代码命令
    git常用命令总结[转]
  • 原文地址:https://www.cnblogs.com/chongyao/p/12212631.html
Copyright © 2020-2023  润新知