mac idea 使用 git github gitee

git

使用idea 自带 git

配置git 信息

idea 配置无需提交的文件

在IDEA中安装.ignore插件。创建好了之后:
安装.gitignoret

给项目添加 .gitignore 文件
image.png

  1. # Created by .ignore support plugin (hsz.mobi)
  2. ### Java template
  3. # Compiled class file
  4. *.class
  5. # Log file
  6. *.log
  7. # BlueJ files
  8. *.ctxt
  9. # Mobile Tools for Java (J2ME)
  10. .mtj.tmp/
  11. # Package Files #
  12. *.jar
  13. *.war
  14. *.nar
  15. *.ear
  16. *.zip
  17. *.tar.gz
  18. *.rar
  19. *target
  20. # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
  21. hs_err_pid*

添加文件后不起作用
1)要先进入项目包所在的文件夹
2)git rm -r –cached . ;//后面有个点
3)git add . ;后面有个点
4)git commit -m “update .gitignore”;//注意中英文符号

github

gitee