300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 【Git】IntelliJ IDEA 提交代码到 GitCode 远程仓库 ( GitCode 创建远程仓库

【Git】IntelliJ IDEA 提交代码到 GitCode 远程仓库 ( GitCode 创建远程仓库

时间:2020-07-08 14:18:14

相关推荐

【Git】IntelliJ IDEA 提交代码到 GitCode 远程仓库 ( GitCode 创建远程仓库

文章目录

前言一、GitCode 创建远程仓库二、将本地工程推送到 GitCode 远程仓库三、验证权限

前言

GitHub 又挂了 , 国内不太好用 , 现在开始使用 gitcode , 地址为 ;

一、GitCode 创建远程仓库

点击右侧头像左边的 + 按钮 , 在弹出的列表中 , 选择 " 新建项目 " 按钮 ;

选择创建空白项目 ;

在下面只需要输入项目名称即可 ;

二、将本地工程推送到 GitCode 远程仓库

这里按照推送现有文件夹的方案 , 推送文件夹 ;

cd existing_foldergit initgit remote add origin /han1201/groovy_demo.gitgit add .git commit -m "Initial commit"git push -u origin master

完整的执行流程 :

Microsoft Windows [版本 10.0.19043.1348](c) Microsoft Corporation。保留所有权利。Y:\002_WorkSpace\003_IDEA\Groovy_Demo>git initInitialized empty Git repository in Y:/002_WorkSpace/003_IDEA/Groovy_Demo/.git/Y:\002_WorkSpace\003_IDEA\Groovy_Demo>git remote add origin /han1201/groovy_demo.gitY:\002_WorkSpace\003_IDEA\Groovy_Demo>git add .warning: LF will be replaced by CRLF in gradle/wrapper/gradle-wrapper.properties.The file will have its original line endings in your working directorywarning: LF will be replaced by CRLF in gradlew.The file will have its original line endings in your working directoryY:\002_WorkSpace\003_IDEA\Groovy_Demo>Y:\002_WorkSpace\003_IDEA\Groovy_Demo>git commit -m "Initial commit"[master (root-commit) 0d26998] Initial commit21 files changed, 335 insertions(+)create mode 100644 .gradle/5.2.1/executionHistory/executionHistory.bincreate mode 100644 .gradle/5.2.1/executionHistory/executionHistory.lockcreate mode 100644 .gradle/5.2.1/fileChanges/last-build.bincreate mode 100644 .gradle/5.2.1/fileHashes/fileHashes.bincreate mode 100644 .gradle/5.2.1/fileHashes/fileHashes.lockcreate mode 100644 .gradle/5.2.1/gc.propertiescreate mode 100644 .gradle/buildOutputCleanup/buildOutputCleanup.lockcreate mode 100644 .gradle/buildOutputCleanup/cache.propertiescreate mode 100644 .gradle/buildOutputCleanup/outputFiles.bincreate mode 100644 .gradle/vcs-1/gc.propertiescreate mode 100644 .idea/.gitignorecreate mode 100644 .idea/gradle.xmlcreate mode 100644 .idea/jarRepositories.xmlcreate mode 100644 .idea/misc.xmlcreate mode 100644 .idea/vcs.xmlcreate mode 100644 build.gradlecreate mode 100644 gradle/wrapper/gradle-wrapper.jarcreate mode 100644 gradle/wrapper/gradle-wrapper.propertiescreate mode 100644 gradlewcreate mode 100644 gradlew.batcreate mode 100644 settings.gradleY:\002_WorkSpace\003_IDEA\Groovy_Demo>Y:\002_WorkSpace\003_IDEA\Groovy_Demo>git push -u origin masterinfo: detecting host provider for '/'...warning: ----------------- SECURITY WARNING ----------------warning: | TLS certificate verification has been disabled! |warning: ---------------------------------------------------warning: HTTPS connections may not be secure. See https://aka.ms/gcmcore-tlsverify for more information.warning: ----------------- SECURITY WARNING ----------------warning: | TLS certificate verification has been disabled! |warning: ---------------------------------------------------warning: HTTPS connections may not be secure. See https://aka.ms/gcmcore-tlsverify for more information.info: detecting host provider for '/'...warning: ----------------- SECURITY WARNING ----------------warning: | TLS certificate verification has been disabled! |warning: ---------------------------------------------------warning: HTTPS connections may not be secure. See https://aka.ms/gcmcore-tlsverify for more information.Enumerating objects: 32, done.Counting objects: 100% (32/32), done.Delta compression using up to 12 threadsCompressing objects: 100% (22/22), done.Writing objects: 100% (32/32), 55.33 KiB | 3.25 MiB/s, done.Total 32 (delta 2), reused 0 (delta 0), pack-reused 0remote:remote: ========================================================================remote:remote: [ 域名remote: 12月22日停用公告](/gitcode/help-docs/-/issues/1)remote:remote: ========================================================================remote:To /han1201/groovy_demo.git* [new branch]master -> masterBranch 'master' set up to track remote branch 'master' from 'origin'.Y:\002_WorkSpace\003_IDEA\Groovy_Demo>

提交的代码如下 :

三、验证权限

其中有个步骤需要输入账号密码 , 这里的账号是 CSDN 用户账号 , 密码是 个人访问令牌 , 参考 【Git】Git 分支管理 ( 解决分支合并冲突 | 推送主版本和分支版本到远程仓库 | 合并分支出现文件冲突 ) 一、推送主版本和分支版本到远程仓库 博客章节 ;

点击右侧头像 , 然后选择 " 设置 " , 在设置界面的 " 访问令牌 " 可以生成 " 个人访问令牌 " , 此处生成的 个人访问令牌 可以作为上面的 GitCode 提交代码时的密码使用 ;

【Git】IntelliJ IDEA 提交代码到 GitCode 远程仓库 ( GitCode 创建远程仓库 | 将本地工程推送到 GitCode 远程仓库 | 验证权限 | 生成个人访问令牌 )

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。