1. 配置git忽略文件
idea有,eclipse,sts文件
gitee有,github没有
*配置Git全局忽略文件*
创建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
\### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
路径使用/,不要使用
[user]
name = a
email = a@163.com
[core]
excludesfile = C:/Users/Administrator/Java.gitignore
2. *idea配置Git环境*
*Git配置*
*idea内置github*
*gitee没有内置插件*
安装插件
3. *git init*
4. *git add* *git commit*
5. *git remote*
第一次push失败 push rejected
git pull origin master –allow-unrelated-histories
6. *git clone*
远程可以不创建仓库,直接将本地项目分享到远程