当前位置:网站首页>git远程库回退指定版本
git远程库回退指定版本
2020-11-06 21:40:00 【会开车的架构师】
操作过程:
首先查看远程仓库版本,如下图所见,最近一次提交为2018-03-19 22:16:25

第一步:使用git log命令查看历史提交记录,选择要回退的版本号,commit后面一串字符,这里我们选择回退到commit 9d85ad9a……

第二步:git reset --hard 9d85ad9a回退本地版本,并使用git log查看是否回退成功

第三步:git push -f强制回退远程仓库到当前版本

操作后查看远程仓库版本,发现2018-03-19 22:16:25的那次提交不见了,远程仓库回退成功

相关延伸:
版权声明
本文为[会开车的架构师]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4629483/blog/4529705
边栏推荐
- Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think
- What are PLC Analog input and digital input
- Behind the record breaking Q2 revenue of Alibaba cloud, the cloud opening mode is reshaping
- For a while, a dynamic thread pool was created, and the source code was put into GitHub
- 美团内部讲座|周烜:华东师范大学的数据库系统研究
- What are manufacturing and new automation technologies?
- What knowledge do Python automated testing learn?
- Tron smart wallet PHP development kit [zero TRX collection]
- 新建一个空文件占用多少磁盘空间?
- 华为云微认证考试简介
猜你喜欢

意派Epub360丨你想要的H5模板都在这里,电子书、大转盘、红包雨、问卷调查……

代码重构之法——方法重构分析

Read the advantages of Wi Fi 6 over Wi Fi 5 in 3 minutes

【转发】查看lua中userdata的方法

【字节跳动 秋招岗位开放啦】Ohayoo!放学别走,我想约你做游戏!!!

Custom function form of pychar shortcut key

大会倒计时|2020 PostgreSQL亚洲大会-中文分论坛议程安排

Pn8162 20W PD fast charging chip, PD fast charging charger scheme

面试官: ShardingSphere 学一下吧

Use modelarts quickly, zero base white can also play AI!
随机推荐
Jetcache buried some of the operation, you can't accept it
Introduction to the structure of PDF417 bar code system
How to demote domain controllers and later in Windows Server 2012
【学习】接口测试用例编写和测试关注点
[C] (original) step by step teach you to customize the control element - 04, ProgressBar (progress bar)
In depth to uncover the bottom layer of garbage collection, this time let you understand her thoroughly
Bitcoin once exceeded 14000 US dollars and is about to face the test of the US election
01. SSH Remote terminal and websocket of go language
使用 Iceberg on Kubernetes 打造新一代雲原生資料湖
Unity性能优化整理
大数据处理黑科技:揭秘PB级数仓GaussDB(DWS) 并行计算技术
行为型模式之解释器模式
Analysis of serilog source code -- how to use it
Use modelarts quickly, zero base white can also play AI!
Analysis of ThreadLocal principle
CCR coin frying robot: the boss of bitcoin digital currency, what you have to know
只有1个字节的文件实际占用多少磁盘空间
[efficiency optimization] Nani? Memory overflow again?! It's time to sum up the wave!!
Take you to learn the new methods in Es5
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王涛