Android Studio Git 忽略文件设置

  1. project的.gitignore

    # Mac 忽略文件
    .DS_Store
    # Built application files
    *.apk
    *.aar
    *.ap_
    *.aab
    
    # Files for the ART/Dalvik VM
    *.dex
    
    # Java class files
    *.class
    
    # Generated files
    bin/
    gen/
    out/
    #  Uncomment the following line in case you need and you don't have the release build type files in your app
    # release/
    
    # Gradle files
    .gradle/
    build/
    
    # Local configuration file (sdk path, etc)
    local.properties
    
    # Proguard folder generated by Eclipse
    proguard/
    
    # Log Files
    *.log
    
    # Android Studio Navigation editor temp files
    .navigation/
    
    # Android Studio captures folder
    captures/
    
    # IntelliJ
    *.iml
    .idea/workspace.xml
    .idea/tasks.xml
    .idea/gradle.xml
    .idea/assetWizardSettings.xml
    .idea/dictionaries
    .idea/libraries
    # Android Studio 3 in .gitignore file.
    .idea/caches
    .idea/modules.xml
    # Comment next line if keeping position of elements in Navigation Editor is relevant for you
    .idea/navEditor.xml
    
    # Keystore files
    # Uncomment the following lines if you do not want to check your keystore files in.
    #*.jks
    #*.keystore
    
    # External native build folder generated in Android Studio 2.2 and later
    .externalNativeBuild
    .cxx/
    
    # Google Services (e.g. APIs or Firebase)
    # google-services.json
    
    # Freeline
    freeline.py
    freeline/
    freeline_project_description.json
    
    # fastlane
    fastlane/report.xml
    fastlane/Preview.html
    fastlane/screenshots
    fastlane/test_output
    fastlane/readme.md
    
    # Version control
    vcs.xml
    
    # lint
    lint/intermediates/
    lint/generated/
    lint/outputs/
    lint/tmp/
    # lint/reports/
    
  2. 然后安心上传代码吧

建议先设置忽略 再关联Git 万一我已经先提交了 那怎么补救呢?好的先删除本地文件然后配置好忽略文件提交代码 最后本地代码撤销删除 这样下次就不会再提交了



作者:東方月初
链接:https://www.jianshu.com/p/0c4c58ffa1b8
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值