CICD 持续集成与持续交付——git

git使用

[root@cicd1 ~]# yum install -y git[root@cicd1 ~]# mkdir demo[root@cicd1 ~]# cd demo/

初始化版本库

[root@cicd1 demo]# git init

查看状态

[root@cicd1 demo]# git status[root@cicd1 demo]# git status  -s #简化输出

[root@cicd1 demo]# echo test > README.md[root@cicd1 demo]# ls[root@cicd1 demo]# git status -s

[root@cicd1 demo]# git add README.md[root@cicd1 demo]# git status  -s

[root@cicd1 demo]# git config --global user.email "924023742@qq.com"[root@cicd1 demo]# git config --global user.name "hjl"[root@cicd1 demo]# git commit -m "add README.md"

[root@cicd1 demo]# echo hello >> README.md[root@cicd1 demo]# git status -s

[root@cicd1 demo]# git add README.md[root@cicd1 demo]# git status -s

[root@cicd1 demo]# echo world >> README.md[root@cicd1 demo]# git status -s


 

[root@cicd1 demo]# git commit -m "v1"[root@cicd1 demo]# git status -s

[root@cicd1 demo]# git add .[root@cicd1 demo]# git status -s[root@cicd1 demo]# git commit -m "v2"[root@cicd1 demo]# git status -s

忽略隐藏文件

[root@cicd1 demo]# touch .a[root@cicd1 demo]# git status -s

[root@cicd1 demo]# vim .gitignore

[root@cicd1 demo]# git status -s

[root@cicd1 demo]# echo helloworld > test.txt[root@cicd1 demo]# git add test.txt[root@cicd1 demo]# git commit -m "add test.txt"

撤销文件修改

[root@cicd1 demo]# rm -f test.txt[root@cicd1 demo]# git status -s[root@cicd1 demo]# git checkout -- test.txt

取消暂存区文件

[root@cicd1 demo]# git rm test.txt[root@cicd1 demo]# git status  -s[root@cicd1 demo]# git reset HEAD test.txt

版本回退

[root@cicd1 demo]# git rm test.txt[root@cicd1 demo]# git commit -m "delete test.txt"[root@cicd1 demo]# git reflog[root@cicd1 demo]# git reset --hard 110c7e6

github远程代码仓库

登录:https://github.com/

上传公钥

[root@cicd1 ~]# ssh-keygen[root@cicd1 ~]# cat .ssh/id_rsa.pub

推送仓库

[root@cicd1 ~]# cd demo/[root@cicd1 demo]# git branch -M main[root@cicd1 demo]# git remote add origin git@github.com:he-bao/demo.git[root@cicd1 demo]# git remote -v[root@cicd1 demo]# git push -u origin main

克隆仓库

[root@cicd1 ~]# rm -fr demo/[root@cicd1 ~]# git clone git@github.com:he-bao/demo.git[root@cicd1 ~]# cd demo/[root@cicd1 demo]# ls

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/148640.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python自动化标注工具+自定义目标P图替换+深度学习大模型(代码+教程+告别手动标注)

省流建议 本文针对以下需求: 想自动化标注一些目标不再想使用yolo想在目标检测/语意分割有所建树计算机视觉项目想玩一玩大模型了解自动化工具了解最前沿模型自定义目标P图替换… 确定好需求,那么我们发车! 实现功能与结果 该模型将首先…

Python中的迭代器、生成器和装饰器

当谈到Python中的迭代器、生成器和装饰器时,这三个概念都是与函数和数据处理密切相关的。让我们逐个深入了解它们。 1. 迭代器(Iterators): 迭代器是一个可以逐个访问元素的对象。在Python中,迭代器实现了两个方法&a…

6 Redis的慢查询配置原理

1、redis的命令执行流程 redis的慢查询只针对步骤3 默认情况下,慢查询的阈值是10ms

基于PHP+MySql的酒店信息管理系统的设计与实现

一、系统开发环境 运行环境:phpstudy或者wampserver, 开发工具:vscodephpstorm 数据库:mysql 二、酒店管理系统功能 1.前台功能: 首页客房推荐,周边特色介绍 酒店在线预订 订单查询,可以…

C++各种字符转换

C各种字符转换 一.如何将char数组转化为string类型二. string转char数组:参考 一.如何将char数组转化为string类型 在C中,可以使用string的构造函数或者赋值操作符来将char数组转换为string类型。 方法1:使用string的构造函数 const char* c…

【Web】Ctfshow SSTI刷题记录1

目录 ①web361 362-无过滤 ②web363-过滤单双引号 ③web364-过滤单双引号和args ④web365-过滤中括号[]、单双引号、args ⑤web366-过滤单双引号、args、中括号[]、下划线 ⑦web367-过滤单双引号、args、中括号[]、下划线、os ⑧web368-过滤单双引号、args、中括号[]、下…

原理Redis-动态字符串SDS

动态字符串SDS Redis中保存的Key是字符串,value往往是字符串或者字符串的集合。可见字符串是Redis中最常用的一种数据结构。 不过Redis没有直接使用C语言中的字符串,因为C语言字符串存在很多问题: 获取字符串长度的需要通过运算非二进制安全…

qt-C++笔记之两个窗口ui的交互

qt-C笔记之两个窗口ui的交互 code review! 文章目录 qt-C笔记之两个窗口ui的交互0.运行1.文件结构2.先创建widget项目,搞一个窗口ui出来3.项目添加第二个widget窗口出来4.补充代码4.1.qt_widget_interaction.pro4.2.main.cpp4.3.widget.h4.4.widget.cpp4.5.second…

ClickHouse数据一致性

查询CK手册发现,即便对数据一致性支持最好的Mergetree,也只是保证最终一致性: 我们在使用 ReplacingMergeTree、SummingMergeTree 这类表引擎的时候,会出现短暂数据不一致的情况。 在某些对一致性非常敏感的场景,通常有…

Flask实现cookie 开发

要在Flask中实现cookie的开发,可以通过使用Flask提供的set_cookie()和get_cookie()函数来设置和获取cookie值。以下是一个示例,演示如何在Flask应用中使用cookie: from flask import Flask, request, make_responseapp Flask(__name__)app.…

庖丁解牛:NIO核心概念与机制详解 03 _ 缓冲区分配、包装和分片

文章目录 Pre概述缓冲区分配和包装 (allocate 、 wrap)缓冲区分片 (slice)缓冲区份片和数据共享只读缓冲区 (asReadOnlyBuffer)直接和间接缓冲区 (allocateDirect)内存映射文件 I/O将文件映射到内存(map) Pre 庖丁解牛&#xff1…

【服务器学习】timer定时器模块

timer定时器模块 以下是从sylar服务器中学的,对其的复习; 参考资料 定时器概述 通过定时器可以实现给服务器注册定时事件,这是服务器上经常要处理的一类事件,比如3秒后关闭一个连接,或是定期检测一个客户端的连接状…

NLP学习:深入NLP

个人博客:Sekyoro的博客小屋 个人网站:Proanimer的个人网站 之前学过一段时间NLP,因为其中涉及到一些深度学习常用的知识或者框架,但苦于不系统以及没有任务focus不能长久.这里借助微软的教程写点东西. tokenization&&representation 将一句话中的单词分割就是分词(…

使用cgroup控制CPU使用率

关键文件 cpu子系统中的关键文件。 cpu.cfs_period_uscpu.cfs_quota_ustaskscgroup.procs 常用命令 查看当前系统内的CPU。 lscpu 查看当前系统内的CPU。 cat /proc/cpuinfo 查看当前的子系统。 lssubsys -a 将进程加入到控制组内。 echo PID > tasks或者 echo PID &…

Python之冒泡排序(AI自动写文章项目测试)

全自动AI生成文章测试,如有不合理地方,请见谅。 一、冒泡排序简介 1.1 冒泡排序概述 冒泡排序(Bubble Sort)是一种简单的排序算法,通过不断交换相邻元素的位置,将最大(或最小)的元…

Rust开发——使用rust实现Redis中hset

一、Redis中hset HSET 是 Redis 中用于在哈希数据结构中设置指定字段的值的命令。哈希是一种类似于字典或映射的数据结构,它存储了键值对的集合,其中每个键都包含多个字段和与这些字段相关联的值。 哈希表在 Redis 中以键值对形式存储,并通…

【产品应用】一体化伺服电机在系留无人机中的应用

一体化伺服电机是一种将电机、驱动器、编码器结合在一起的伺服系统,具有高精度控制、快速响应和高效运行等优点。系留无人机则是一种通过绳索或链条与地面设施连接的无人机,能够实现长时间的稳定悬停和空中作业。 01.设备简介 电源线牵引装置&#xff1…

uniapp如何使用api相关提示框

uni.showToast:用于显示一条带有图标的提示框。title:提示的内容。icon:图标,可选值包括 success、loading、none。duration:提示框持续时间(单位:毫秒),默认为1500。 un…

leetcode面试经典150题——29 三数之和

题目:盛最多水的容器 描述: 给你一个整数数组 nums ,判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i ! j、i ! k 且 j ! k ,同时还满足 nums[i] nums[j] nums[k] 0 。请 你返回所有和为 0 且不重复的三元组。 注意…

TG Pro v2.87(mac温度风扇速度控制工具)

TG Pro 是适用于 macOS 的温度和风扇速度控制工具,可让您监控 Mac 组件(例如 CPU 和 GPU)的温度和风扇速度。如果您担心 Mac 过热或想要手动调整风扇速度以降低噪音水平,这将特别有用。 除了温度和风扇监控,TG Pro 还…