zoukankan      html  css  js  c++  java
  • git不区分文件名大小写这种坑当然要跳出来

    关于遇到git提交文件名称不区分大小写这事儿就是个坑
    java类名和和文件名不一致在IDEA里明明改好了,等从git上clone下来就是不对也是纠结了我好一阵子;

    所以这时大概只好用 --force了,强制更新掉远程的文件
    git mv --force filename FILENAME
    或者实在喜欢简短命令的
    git mv -f filename FILENAME
    然后add commit push什么的就不提了~
    对了 文件较多的情况在任意子目录add -u :/

    嗯~跳坑笔记结束

    嗯~加强补充:
    简单粗暴点的办法就是直接配置git更省事儿
    git config --global core.ignorecase false

    然后拓展下git的好用的基本的配置:
    git config --global user.name "你的名字"
    git config --global user.email "你的邮箱"
    git config --global push.default simple
    //什么gui呢?gitpush时有俩参数,‘matching’ 参数是 Git 1.x 的默认行为,其意是如果你执行 git push 但没有指定分支,它将 push 所有你本地的分支到远程仓库中对应匹配的分支。
    而 Git 2.x 默认的是 simple,意味着执行 git push 没有指定分支时,只有当前分支会被 push 到你使用 git pull 获取的代码

    git config --global core.autocrlf false //* 让Git不要管Windows/Unix换行符转换的事
    git config --global gui.encoding utf-8 #//避免git gui中的中文乱码
    git config --global core.quotepath off //
    避免git status显示的中文文件名乱码



    作者:不玩藤球的猫
    链接:https://www.jianshu.com/p/4c7d9dcd4b5a
    來源:简书
    简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
  • 相关阅读:
    Mybatis plus注解使用
    RabbitMQ--mandatory、immediate参数和备份交换器
    Assert.assertEquals作用
    @PreAuthorize,@PostAuthorize, @Secured注解+EL表达式
    Derby数据库简单介绍和使用方法
    微服务—链路追踪(Sleuth+Zipkin)
    SpringCloudStream学习笔记(转)
    Oracle-最大连接数
    Oracle-in查询超过1000
    Oracle-索引
  • 原文地址:https://www.cnblogs.com/itzfz/p/9762339.html
Copyright © 2011-2022 走看看