一、新建项目

 

 

 

 

 1、改为git版本

 

2、出现如下框 选择Git

 

 3、新建一个.gitignore file (Git)

 

4、勾掉一些不需要的

 

 5、出现如下框

 

 5.1、如果不知道.gitignore file (Git) 要勾选掉哪些  就直接复制如下代码到.gitignore 里就好

# Created by .ignore support plugin (hsz.mobi)
### Maven template
target/

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# IntelliJ
/out/
/build/

# mpeltonen/sbt-idea plugin
.idea_modules/

### OSX template
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Windows template
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

~*

### Eclipse template
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Java annotation processor (APT)
.factorypath

# PDT-specific
.buildpath

# sbteclipse plugin
.target

# TeXlipse plugin
.texlipse


#.gitignore
.checkstyle
test-output

 

 6、项目add后  新建的类包括.gitignore会由红色变成绿色 

 

 7、项目里添加类与代码后  commit ...(到本地库)

 

8、如下

 

 

 9、连接远程仓库

 

            

 

 10、在coding注册登录账号后  复制下图SSH的URL到上方的框里  (选用ssh传输协议更安全)

 

11、Pull 一下(更新拉取)

 

12、Push(提交到远程仓库)

 

 

 

13、云端查看提交的代码如下 (上传完成)