116970u

GitHub 官网样例文件
https://github.com/github/gitignore
https://github.com/github/gitignore/blob/master/Java.gitignore

我在.gitconfig所在的目录下创建一个Java.gitignore(名称和位置随意,这样做主要是查找方便)

在刚刚创建的Java.gitignore文件中写入以下内容:

#官方忽略
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#新增
.classpath
.project
.settings
target

保存,并关闭。

在.gitconfig文件中加入配置信息:

[core]
    excludesfile = C:/Users/Jack/Java.gitignore

配置成功后,eclipse会自动识别

重新启动eclipse,这时你想被忽略的文件就被成功忽略了。

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-11-28
  • 2022-01-17
  • 2021-05-24
  • 2022-12-23
猜你喜欢
  • 2021-12-31
  • 2021-11-11
  • 2022-01-26
  • 2021-04-12
  • 2021-12-06
  • 2021-11-27
  • 2022-01-05
相关资源
相似解决方案