IDEA 设置不提交本地配置文件
IDEA Git About 595 words场景
以Spring Boot为例,本地开发环境与配置文件设置的端口不一致,改动了application-dev.yaml。
每次提交代码时都会勾选application-dev.yaml。虽然可以取消勾选,或者选中src目录只提交src目录下的改动,但这还不是很方便。
理想方法
每次提交时,指定一些改动过的文件默认不提交。
解决方法
IDEA中默认的改动都在Default Changelist默认改动列表中,我们可以新建一个Changelist改动列表,将指定文件从默认改动列表移动到新建改动列表。
每次提交时IDEA默认选择的是Default Changelist,而指定文件在新建的改动列表中,所以不会被提交,不用再每次取消勾选了。
步骤
- 点击
Changlists,再点击New Changelist,创建新Changelist。 - 输入新
Changelist名称和备注,备注可以不用填写。 - 将改动过的不需要每次都提交的文件拖动到新创建的
Changelist中。 - 提交时可以看到默认的
Changelist没有了改动过的文件,切换到新创建的Changelist时可以看到改动的文件。
示意图

视频讲解
Views: 5,179 · Posted: 2022-08-06
———         Thanks for Reading         ———
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Prev Post
Next Post
Today In History
- ECharts 解决 Sankey 桑基图没有动画问题 Views: 18 · Posted: 2026-04-08
- Telepresence 开发中的常用命令 Views: 2,399 · Posted: 2023-04-08
- Java 中的锁 ReentrantReadWriteLock 读写锁 Views: 2,893 · Posted: 2021-04-08
- Spring Boot 打包本地 jar 包到 war 包中 Views: 2,937 · Posted: 2020-04-08
- Android adb 命令 Views: 6,893 · Posted: 2019-04-08
- JavaScript 页面切换后更改标题 Views: 2,768 · Posted: 2019-04-08
- IDEA 滚轮调节字体大小 Views: 4,432 · Posted: 2019-04-08
- IDEA 去除 Unchecked cast from Object to 提示 Views: 5,539 · Posted: 2019-04-08
- Java 按字典顺序排序请求参数 Views: 7,249 · Posted: 2019-04-08
- Java 储存相同 key 的 map Views: 4,955 · Posted: 2019-04-08
- Java 测试迭代集合耗时 Views: 4,932 · Posted: 2019-04-08
- The temporary upload location [xxxRoot] is not valid Views: 4,341 · Posted: 2019-04-08
- Spring Boot Undertow 上传文件后没有可读权限 Views: 7,805 · Posted: 2019-04-08
- Java8 @FunctionalInterface 注解 Views: 3,138 · Posted: 2019-04-08
- Vue-cli+webpack 配置接口代理解决跨域问题 Views: 4,200 · Posted: 2019-04-08
- PHP 序列化与反序列化 Views: 3,635 · Posted: 2019-04-08
- PHP 关闭 X-Powered-By 信息 Views: 3,002 · Posted: 2019-04-08
- PHP编译安装redis扩展 Views: 3,659 · Posted: 2019-04-08
- PHP Markdown 解析器 Views: 4,154 · Posted: 2019-04-08
- PHP查看配置文件所在位置 Views: 3,455 · Posted: 2019-04-08
- PHP 压缩 HTML 代码 Views: 3,671 · Posted: 2019-04-08
- PhpStorm 设置大括号不换行 Views: 10,034 · Posted: 2019-04-08
- PHP 时间加减 Views: 4,006 · Posted: 2019-04-08
- PHP curl 报错:SSL connect error Views: 4,711 · Posted: 2019-04-08
- PHP 字段对应 MySQL 字段 Views: 3,345 · Posted: 2019-04-08
- ThinkPHP5 设置 Redis 长连接 Views: 7,026 · Posted: 2019-04-08
- ThinkPHP5 设置数据库长连接 Views: 6,898 · Posted: 2019-04-08
- PHP 生成重复固定随机数邀请码 Views: 4,370 · Posted: 2019-04-08
- PHP 使用 json_encode 格式化下标不为 0 开始的数组会转为对象 Views: 4,619 · Posted: 2019-04-08
- PHP 获取毫秒值时间戳 Views: 5,618 · Posted: 2019-04-08
- PHP 设置 json_encode 不转义中文 Views: 4,189 · Posted: 2019-04-08
- PHP 判断函数、类、方法、属性、数组中的 key 是否存在 Views: 6,240 · Posted: 2019-04-08
- Redis 提示没有权限 Views: 6,189 · Posted: 2019-04-08
- Redis 线上禁用命令 Views: 4,264 · Posted: 2019-04-08
- Redis 最大内存策略 Views: 3,032 · Posted: 2019-04-08
- Redis 内存信息 Views: 3,875 · Posted: 2019-04-08
- Redis 使用 bigkeys 命令查找大 key Views: 6,765 · Posted: 2019-04-08
- Redis 运行统计信息 Views: 3,538 · Posted: 2019-04-08
- Redis 实现统计在线人数、每日签到功能 Views: 7,129 · Posted: 2019-04-08
- Redis 使用 HyperLogLog 统计独立 IP 数 Views: 4,923 · Posted: 2019-04-08
- Redis 监控 monitor Views: 4,399 · Posted: 2019-04-08
- Redis 过期时间问题 Views: 3,817 · Posted: 2019-04-08
- Redis 查看连接数 Views: 4,709 · Posted: 2019-04-08
Browsing
Refresh
Loading...
- Git 命令之回退到指定 commit Views: 4798
- curl 命令遇到重定向时请求重定向后地址 Views: 6391
- Spring Boot Thymeleaf URL 链接 Views: 1954
- Linux MySQL 更改数据存储目录 Views: 3672
- CSS 实现加载中旋转进度条 Views: 1031
- 自定义 spring-boot-starter Views: 4242
- Java 无法 debug Finalizer 类 Views: 1534
- Java 虚拟线程调度器 ForkJoinPool 自定义参数设置 Views: 453
- 算法每日一题20190619:两数之和 Views: 3562
- 算法:中缀表达式转后缀表达式 Views: 2972