天天看點

idea中配置Terminal調用git-cmd介紹

介紹

idea的Terminal中預設調用的是作業系統的cmd指令。這裡為了使用git管理更友善一點,将Terminal修改為調用git-cmd指令,具體步驟如下

git的重要性

這裡不用再贅述了吧,開發的小夥伴應該都明白,為啥不用svn,自行百度!

安裝git

請在浏覽器中輸入【Git安裝教程】,對着安裝就好,很簡單

重頭戲,在idea中配置Terminal

  1. 在idea中配置下git
    idea中配置Terminal調用git-cmd介紹
  2. 修改Terminal調用的指令
    idea中配置Terminal調用git-cmd介紹
    3 用起來
    idea中配置Terminal調用git-cmd介紹
    4 多敲一些指令玩玩
D:\workspace\demo>Git add .
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .mvn/wrapper/MavenWrapperDownloader.java.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .mvn/wrapper/maven-wrapper.properties.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in mvnw.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in mvnw.cmd.
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 src/main/java/com/zyu/boot/demo/DemoApplication.java.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/main/resources/application.yml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/test/java/com/zyu/boot/demo/DemoApplicationTests.java.
The file will have its original line endings in your working directory

D:\workspace\demo>git commit -am "搭建springboot基礎項目"
[master (root-commit) 347c29c] 搭建springboot基礎項目
 11 files changed, 785 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java
 create mode 100644 .mvn/wrapper/maven-wrapper.jar
 create mode 100644 .mvn/wrapper/maven-wrapper.properties
 create mode 100644 mvnw
 create mode 100644 mvnw.cmd
 create mode 100644 pom.xml
 create mode 100644 src/main/java/com/zyu/boot/demo/DemoApplication.java
 create mode 100644 src/main/java/com/zyu/boot/demo/controller/TestController.java
 create mode 100644 src/main/resources/application.yml
 create mode 100644 src/test/java/com/zyu/boot/demo/DemoApplicationTests.java

D:\workspace\demo>git status
On branch master
nothing to commit, working tree clean

           

擴充

确實這麼配置之後,用起git來很友善。Git在項目管理中很重要,其他的進階用法,可以自行百度琢磨。這個不隻是可以配置git,還可以配置其他個性化的操作,期待小夥伴們的分享!!!

上一篇: idea使用方法
下一篇: idea的使用