一、新建項目
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、雲端查看提交的代碼如下 (上傳完成)