Git入门之在IDEA中使用Git上传maven项目

下载安装git客户端:

    参考博文:https://www.cnblogs.com/java-maowei/p/5950930.html

在IDEA怎么使用git上传spring的maven项目详解:

 一:在IEDA的settings设置中输入Git,先配置托管

      

  再配置本机连接端

二:设置聚合项目中没必要提交的文件

  1.在maven项目下新建文件,并命名为  .gitignore  

    

   内容为:

# Created by .ignore support plugin (hsz.mobi)
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

.idea/

## File-based project format:
*.iws
*.iml
*.ipr

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

 2.创建仓库

3.怎么知道创建好没,找到打开当前项目的目录位置,出现下面情况则为创建成功

4.现在你会发现VCS下多出了Git的选项栏,点击Add将当前项目添加到索引库:

 5.添加到本地索引库后,会发现Git下的Check In变亮可点击了,这时将项目添加到本地仓库

猜你喜欢

转载自www.cnblogs.com/lwh-note/p/9131058.html