- 添加git 忽略文件
- ignore 文件如下,在文件中添加target 及logs 文件目录
# Created by .ignore support plugin (hsz.mobi)
### Java template
# 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*
target/
logs/
- Create Git Repository
CVS – Import into Version Control – Create Git Repository
-
在gitlab 私服上,创建远程仓库
-
配置远程仓库的位置
-
提交代码到本地
-
源代码推送到远程仓库