gitcode代码仓库的基本使用
代码 基本 仓库 使用
2023-09-14 09:15:41 时间
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 "123456@qq.com"
[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 = 123456@qq.com
[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 root@localhost.localdomain
2.添加公钥到gitcode
六、上传文件到gitcode
[root@compute-node1 gitcode]# git push git@gitcode.net: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 git@gitcode.net:jks212454/it-items.git
56dcb17..24c29d9 master -> master
[root@compute-node1 gitcode]#
七、gitcode查看
相关文章
- 代码重构(一):函数重构规则
- ASP.NET Core应用基本编程模式[5]:如何放置你的初始化代码
- 一段让人瑟瑟发抖的ABAP代码
- Atitit. Attilax软件研发and开发之道 1. 基本语言3 2. 标准化库api3 3. Ied与代码编写 调试3 4. ui3 5. 通讯3 6. 第三方库3 7. 数据
- 请问微信小程序体验版二维码的有效期是多久?永久有效吗?还有如果我更新了代码版本之后,之前的体验版二维码会不会被覆盖呢?
- 低代码基本语法
- Database之SQL:SQL语句操作三类(数据定义语句DDL/数据操作语句DML/数据控制语句DCL/其他基本语句、流程控制语句、批处理语句)概念及其代码实现案例之详细攻略
- Database之SQL:SQL在线编程、工作中常用SQL代码实践(以语法为导向的增、删、改、查,已基本涵盖所有语法案例)之详细攻略
- 100天精通Python(数据分析篇)——第56天:Pandas读写txt和csv文件(read_csv、to_csv参数说明+代码实战)
- 基于Dijkstra和A*算法的机器人路径规划(Matlab代码实现)
- 【无人机】采用最基本的自由空间路损模型并且不考虑小尺度衰落(多径多普勒)固定翼无人机轨迹规划(Matlab代码实现)
- 使用x射线与大块材料中原子相互作用的基本理论模拟相对强度XRD图案(Matlab代码实现)
- ECG信号处理——包括基本波检测、信号去噪、信号重建度量(Matlab代码实现)
- 水下图像融合增强(Matlab代码实现)
- 用于高效高光谱图像分类的多尺度上下文感知集成深度 KELM(Matlab代码实现)
- oracle 存储过程定义及调试,并终于被C# 调用 代码
- 让 Python 代码更易维护的七种武器——代码风格(pylint、Flake8、Isort、Autopep8、Yapf、Black)测试覆盖率(Coverage)CI(JK)
- PHP PSR-1 基本代码规范(中文版)
- Verilog小练习- 看时序写代码(07--08)
- 《论文代码》CARE: Commonsense-Aware Emotional Response Generation with Latent Concepts
- 第二章 网页基本代码
- PE格式:IATHook原理分析与代码编写
- 【状态估计】将变压器和LSTM与卡尔曼滤波器结合到EM算法中进行状态估计(Python代码实现)
- 学习C++:C++进阶(六)如何在C++代码中调用python类,实例化python中类的对象,如何将conda中的深度学习环境导入C++项目中
- 支持DevOps和功能安全/信息安全的静态代码分析器 Klocwork——Klocwork的主要功能特性:提供⽹⻚端集中式分析与管理平台;⽀持的IDE;⽀持的编译器;⽀持的操作系统| 资质认证