配置用户名邮箱
Window -> Preferences -> Team -> Git -> Configuration
配置文件过滤
GitHub 官网样例文件: https://github.com/github/gitignore https://github.com/github/gitignore/blob/master/Java.gitignore
新建一个*.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文件中指定*.gitignore文件路径
[user] name = test email = test@gmail.com [core] excludesfile = C:/Users/Administrator/Java.gitignore # 注意:路径这要使用"/",不能使用"\"
返回eclipse查看是否已读取*.gitignore文件