git基础操作

  1. 查看变更
bash 复制代码
git status
  1. 选择要合并的代码
bash 复制代码
git add 
  1. 提交变更内容
bash 复制代码
git commit -m "PR:123 日期:2024年02月19日 内容:支持清除告警事件 责任人:yuanb"
  1. 合入远程仓库
bash 复制代码
git push origin HEAD:refs/for/master

5、查看要合入的分支

bash 复制代码
git branch

6、查看所有分支

bash 复制代码
git branch -a

7、对比修改文件内容

bash 复制代码
git diff threat-ms/pom.xml

8、重新合入

bash 复制代码
git commit --amend  -m "PR:MARS-64229 日期:2024年02月19日 内容:支持清除告警事件 责任人:袁博"

9、git commit之后撤销:

bash 复制代码
git reset --soft HEAD^

10、git add之后撤销

bash 复制代码
git reset

11、获取版本ID

bash 复制代码
git log 获取版本commit ID

12、版本回退

bash 复制代码
git reset  版本commit ID
相关推荐
醇氧20 小时前
Ping 127.0.0.1 具有 32 字节的数据:一般故障。【二】
运维·服务器·开发语言
LeenixP21 小时前
RK3576-Debian12删除userdata分区
linux·运维·服务器·数据库·debian·开发板
qq_ceiling21 小时前
H3C交换机配置M-LAG
运维·服务器·网络
warton8821 小时前
ubuntu24 安装 proxsql 实现数据库代理
linux·运维·mysql·ubuntu
会跑的葫芦怪21 小时前
cursor 打开wsl Ubuntu项目
linux·运维·ubuntu
Full Stack Developme1 天前
linux sudo su su - 三者区别
linux·运维·服务器
Byron Loong1 天前
【系统】Linux内核和发行版的关系
linux·运维·服务器
weixin_399380691 天前
OA 系统假死问题分析与优化
java·运维
济6171 天前
linux(第十四期)--Uboot移植(2)-- 在U-Boot 中添加自己的开发板-- Ubuntu20.04
linux·运维·服务器
ben9518chen1 天前
嵌入式linux操作系统简介
linux·运维·服务器