当前位置: 首页 > news >正文

【git】Idea中git的使用

配置git

在这里插入图片描述

创建git仓库

在这里插入图片描述

不同颜色代表的含义

在这里插入图片描述

  • 红色——未加入版本控制;
  • 绿色——已经加入控制暂未提交;
  • 蓝色——加入,已提交,有改动;
  • 白色——加入,已提交,无改动;
  • 灰色——版本控制已忽略文件;
  • 黄色——被git忽略,不跟踪。

添加文件到暂存区

在这里插入图片描述
文件在没有被添加到暂存区的时候,是红色的;添加到暂存区之后,是绿色的

提交到仓库

文件右键
在这里插入图片描述
或者通过导航栏(原来的VCS已经变成了Git)
在这里插入图片描述
在这里插入图片描述
提交之后文件会从绿色变为白色

修改文件

文件会变蓝色
可以直接提交,不需要再次添加

点击右侧不同,还可以回退或者查看不同
在这里插入图片描述

新建文件

在这里插入图片描述

查看版本历史

在这里插入图片描述
在这里插入图片描述

查看git记录

在这里插入图片描述

18:24:28.488: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false init
Initialized empty Git repository in D:/IDEA_Project/FileUpload/.git/
18:25:18.272: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- FileUpload.iml out/artifacts/FileUpload_war_exploded/index.html .idea/.gitignore .idea/runConfigurations.xml out/artifacts/FileUpload_war_exploded/META-INF/MANIFEST.MF .idea/misc.xml out/artifacts/FileUpload_war_exploded/WEB-INF/web.xml src/main/java/version4/Upload4.java .idea/jarRepositories.xml .idea/compiler.xml .idea/artifacts/FileUpload_war_exploded.xml web/index.html web/WEB-INF/web.xml pom.xml
18:25:18.560: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- .
warning: LF will be replaced by CRLF in out/artifacts/FileUpload_war_exploded/WEB-INF/web.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web/WEB-INF/web.xml.
The file will have its original line endings in your working directory
18:29:49.582: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- .idea/runConfigurations.xml pom.xml FileUpload.iml .idea/.gitignore .idea/artifacts/FileUpload_war_exploded.xml .idea/misc.xml src/main/java/version4/Upload4.java web/index.html .idea/jarRepositories.xml out/artifacts/FileUpload_war_exploded/META-INF/MANIFEST.MF .idea/compiler.xml out/artifacts/FileUpload_war_exploded/WEB-INF/web.xml web/WEB-INF/web.xml out/artifacts/FileUpload_war_exploded/index.html
18:29:49.712: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\gao\AppData\Local\Temp\git-commit-msg-.txt --
[master (root-commit) f61e227] 第一次提交14 files changed, 216 insertions(+)create mode 100644 .idea/.gitignorecreate mode 100644 .idea/artifacts/FileUpload_war_exploded.xmlcreate mode 100644 .idea/compiler.xmlcreate mode 100644 .idea/jarRepositories.xmlcreate mode 100644 .idea/misc.xmlcreate mode 100644 .idea/runConfigurations.xmlcreate mode 100644 FileUpload.imlcreate mode 100644 out/artifacts/FileUpload_war_exploded/META-INF/MANIFEST.MFcreate mode 100644 out/artifacts/FileUpload_war_exploded/WEB-INF/web.xmlcreate mode 100644 out/artifacts/FileUpload_war_exploded/index.htmlcreate mode 100644 pom.xmlcreate mode 100644 src/main/java/version4/Upload4.javacreate mode 100644 web/WEB-INF/web.xmlcreate mode 100644 web/index.html
18:31:29.597: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- src/main/java/version4/Upload4.java
18:33:21.589: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- src/main/java/version4/Test1.java
18:36:33.726: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- src/main/java/version4/Test1.java src/main/java/version4/Upload4.java
18:36:33.862: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\gao\AppData\Local\Temp\git-commit-msg-.txt --
[master fb72771] 第二次提交2 files changed, 9 insertions(+)create mode 100644 src/main/java/version4/Test1.java
18:37:05.852: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- src/main/java/version4/Upload4.java
18:37:05.985: [FileUpload] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\gao\AppData\Local\Temp\git-commit-msg-.txt --
[master eb6ec4c] 第三次提交1 file changed, 1 insertion(+)
http://www.lryc.cn/news/19517.html

相关文章:

  • Centos安装Python、PyCharm
  • 搞百亿补贴,京东不能只“砸钱”
  • automl介绍以及代码实例
  • kill 与killall
  • 【加密】开发常见加密类型
  • 数据结构之基:从根儿上了解数据结构的特性
  • C++ 枚举详解
  • 【vue3】ref , reactive ,toRef ,toRefs 使用和理解
  • fastadmin:如何点击按钮弹出存在的指定页面的弹窗
  • 【storybook】你需要一款能在独立环境下开发组件并生成可视化控件文档的框架吗?(三)
  • Android源码分析 —— Activity栈管理(基于Android8)
  • Python实现贝叶斯优化器(Bayes_opt)优化支持向量机分类模型(SVC算法)项目实战
  • 【华为OD机试模拟题】用 C++ 实现 - 分积木(2023.Q1)
  • FFmpeg/OpenCV 实现全屏斜体水印
  • Calendar计算两个时间之间相差几个月
  • FPGA基础知识
  • C语言运算符逻辑运算符位运算符
  • 机器学习:基于主成分分析(PCA)对数据降维
  • 软件测试之测试模型
  • 【项目精选】网络考试系统的设计与实现(源码+视频+论文)
  • Python近红外光谱分析与机器学习、深度学习方法融合实践技术
  • 实例7:树莓派呼吸灯
  • java 接口 详解
  • 用 Visual Studio 升级 .NET 项目
  • JavaWeb中FilterListener的神奇作用
  • 移动端布局
  • 前端无感登录,大文件上传
  • Spring Boot系列03--自动配置原理
  • Java多线程(四)---并发编程容器
  • Apache Hadoop生态部署-Flume采集节点安装