首页 > 其他分享 > gitcode代码仓库的基本使用

gitcode代码仓库的基本使用

时间:2023-07-20 19:06:43浏览次数:34  
标签:gitcode git compute 仓库 代码 -- node1 root

(gitcode代码仓库的基本使用)

一、gitcode官网简介

GitCode 是 CSDN 为开发者提供的开源项目创新服务平台,秉承“创新、开放、协作、共享”的开源价值观,致力于为大规模开源开放协同创新助力赋能,打造创新成果孵化和新时代开发者培养的开源创新生态!支持公有云使用、私有化部署以及软硬一体化私有部署。

二、本地配置

1.安装git工具

yum -y install git

2.配置本地git信息

[root@compute-node1 gitcode]# git config --global user.name "wangming"
[root@compute-node1 gitcode]# git config --global user.email "[email protected]"
[root@compute-node1 gitcode]# git config --global color.ui true
[root@compute-node1 gitcode]# 

3.查看git个人信息

[root@compute-node1 gitcode]# cat ~/.gitconfig 
[user]
	name = wangming
	email = [email protected]
[color]
	ui = true

二、创建本地仓库

1.创建本地工作区

[root@compute-node1 gitcode]# git init .
Initialized empty Git repository in /git/gitcode/.git/
[root@compute-node1 gitcode]# ls -a
.  ..  found_file.sh  .git
[root@compute-node1 gitcode]# 

2.将文件放入暂存区

[root@compute-node1 gitcode]# git add .

3.将暂存区文件放入本地仓库

[root@compute-node1 gitcode]# git commit -m "1.0 master-wangming create item for test scripts  "
[master (root-commit) f1491e2] 1.0 master-wangming create item for test scripts
 1 file changed, 21 insertions(+)
 create mode 100755 found_file.sh

4.查看版本记录

[root@compute-node1 gitcode]# git log --oneline 
f1491e2 1.0 master-wangming create item for test scripts

三、gitcode网站个人仓库配置

1.登录个人仓库

在这里插入图片描述

2.新建个人仓库

在这里插入图片描述

3.查看个人仓库

在这里插入图片描述

四、连接远程仓库

1.连接gitcode

[root@compute-node1 gitcode]# git remote add origin https://gitcode.net/jks212454/it-items.git
[root@compute-node1 gitcode]# 

2.查看连接状态

[root@compute-node1 gitcode]# git remote -v
origin	https://gitcode.net/jks212454/it-items.git (fetch)
origin	https://gitcode.net/jks212454/it-items.git (push)

五、配置ssh免密

1.查看本机公钥

[root@compute-node1 gitcode]# cat ~/.ssh/id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjmRSBowMRzqDO4JFwveGTYZ/CtaOWKEu/G5GZ5HwYDDa/+Hps03DzXnOffkZARkPPmNNFVzE1/mCVA3LpMMDCeV3JfgrLLYSmwY4cNTgVMQ4NLs0uk4UkmBGwb/nP1IYX9Z+qpmGe/caUOFXGdvsGPRtjXC9llUGJCn1U4tkyhjX1hiwuPPlFl4XHw5w0EyCRwTtzzTn1Ma66DN5Ovc644GIbECnhVyOcXbzroZeiN3Ms+XfhVA/m9gCj9gXo+AUFC1wgHvwoBOLkx+PjKhOMz/nz4lSVEd/yURBGlcM6+wKYbTzeSdWGh0TG8mIMIBPd+vRIbNfW6R96NR/SLTMl [email protected]

2.添加公钥到gitcode

在这里插入图片描述

六、上传文件到gitcode

[root@compute-node1 gitcode]# git push [email protected]:jks212454/it-items.git
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 842 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To [email protected]:jks212454/it-items.git
   56dcb17..24c29d9  master -> master
[root@compute-node1 gitcode]# 


七、gitcode查看

在这里插入图片描述

标签:gitcode,git,compute,仓库,代码,--,node1,root
From: https://blog.51cto.com/u_14664141/6790006

相关文章

  • android studio快速自动生成代码
    AndroidStudio快速自动生成代码简介在Android开发中,编写大量重复的代码是一件枯燥乏味的事情。为了提高开发效率,AndroidStudio为开发者提供了一些强大的自动生成代码的功能。这些功能可以帮助开发者快速生成常见的代码模板,减少重复性的劳动,让开发者专注于业务逻辑的实现。自动......
  • Clion代码自动格式化保存
    目录前言使用外部工具ArtisticStyleClion插件配置注意前言使用Clion的时候,可以自动格式化代码的操作.使用外部工具ArtisticStyle序号名称地址1ArtisticStylehttps://sourceforge.net/projects/astyle/下载后解压.Clion插件配置1.在plugin中......
  • 进入流程化管理,就让低代码产品公司加油助力!
    企业想要进入流程化管理,将内部数据有效贯通起来,发挥应有的价值,可以与低代码产品公司强强联手,共同打造专属的快速框架,实现提质增效的目的。在社会高度发展的今天,企业的数据信息越来越多,业务量也越来越繁茂,如果还停留在传统的开发模式上,就无法实现高效发展,而应用低代码开发平台明显......
  • javascript中map reduce filter的示例代码
    以下是JavaScript中map、reduce和filter的示例代码:Map(映射)示例代码:Map函数将数组中的每个元素映射为一个新的值,返回一个新的数组。constnumbers=[1,2,3,4,5];//将数组中的每个元素平方constsquaredNumbers=numbers.map(num=>num*num);console.log(square......
  • 代码随想录训练营 Day01- 数组(上)
    概述第一天主要学习的是数组相关的内容,相关学习的内容包括数组的基本特性的学习,二分搜索方法的学习。数组特点数组的基本特点包括:下标从0开始内存连续性(Java中定义数组需要直接声明其空间大小)数组元素不可以删,只能覆盖ArrayList底层是数组实现,其实际上应该叫一......
  • jsp写java代码 添加html标签
    JSP写Java代码添加HTML标签简介JSP(JavaServerPages)是一种动态网页技术,允许将Java代码嵌入到HTML页面中。通过在JSP文件中添加Java代码,我们可以在生成的HTML页面中插入动态内容,包括HTML标签。本文将介绍如何在JSP中写Java代码来添加HTML标签,并提供相应的代码示例。JSP基础在开......
  • FedR代码的学习
    wwcnt_mat=sparse.csr_matrix((dat_values,(row_indxs,col_indxs)))这句代码创建了一个稀疏矩阵(sparsematrix)wwcnt_mat,其中dat_values是矩阵中非零元素的值,而(row_indxs,col_indxs)是对应的非零元素所在的行和列的索引。具体地说,sparse.csr_matrix((dat_values,(ro......
  • 伙伴云对话海尔施:零代码不止于企业精益运营,更是数字化文化建设的助推器
    内容来源:2023年6月6日,伙伴云【小伙开麦】直播栏目伙伴云对话海尔施,主题为“零代码不止于企业精益运营,更是数字化文化建设的助推器”。分享嘉宾:袁兆江,伙伴云联合创始人、胡楠伙伴学院负责人;廉玮晟,海尔施业务系统负责人、李庆海尔施信息部经理。如何通过数字化赋能员工、赋能企业、赋......
  • 100303- ZooKeeper 配置管理代码实现案例
    一、ZooKeeper的配置管理( ConfigurationManagement)使用场景配置的管理在分布式应用环境中很常见,例如同一个应用系统需要多台 PCServer 运行,但是它们运行的应用系统的某些配置项是相同的,如果要修改这些相同的配置项,那么就必须同时修改每台运行这个应用系统的 PCServe......
  • git pull本地拉取代码时,No remote repository specified报错处理
    找到本地仓库文件夹,在.git路径下,找到config文件,进去修改[core] repositoryformatversion=0 filemode=false bare=false logallrefupdates=true ignorecase=true[remote"origin"]url=https://git.xxx/x'x'x/aaa.git fetch=+refs/heads/*:refs/remotes/ori......