当前位置:网站首页>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
边栏推荐
- [Xinge education] poor learning host computer series -- building step 7 Simulation Environment
- What are the criteria for selecting a cluster server?
- Digital city responds to relevant national policies and vigorously develops the construction of digital twin platform
- Introduction to Google software testing
- 快速排序为什么这么快?
- Markdown tricks
- 【自学unity2d传奇游戏开发】地图编辑器
- Multi robot market share solution
- Will blockchain be the antidote to the global epidemic accelerating the transformation of Internet enterprises?
- Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
猜你喜欢

The importance of big data application is reflected in all aspects

Description of phpshe SMS plug-in

只有1个字节的文件实际占用多少磁盘空间

Git rebase is in trouble. What to do? Waiting line

事件监听问题

EOS founder BM: what's the difference between UE, UBI and URI?

大数据处理黑科技:揭秘PB级数仓GaussDB(DWS) 并行计算技术

DRF JWT authentication module and self customization

Even liver three all night, jvm77 high frequency interview questions detailed analysis, this?

MongoDB与SQL常用语法对应表
随机推荐
Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]
Application of restful API based on MVC
FastThreadLocal 是什么鬼?吊打 ThreadLocal 的存在!!
意派Epub360丨你想要的H5模板都在这里,电子书、大转盘、红包雨、问卷调查……
【自学unity2d传奇游戏开发】地图编辑器
image operating system windows cannot be used on this platform
C + + and C + + programmers are about to be eliminated from the market
How does filecoin's economic model and future value support the price of fil currency breaking through thousands
Take you to learn the new methods in Es5
What is the purchasing supplier system? Solution of purchasing supplier management platform
The legality of IPFs / filecoin: protecting personal privacy from disclosure
Basic usage of GDB debugging
How about small and medium-sized enterprises choose shared office?
前端未來趨勢之原生API:Web Components
Flink's datasource Trilogy 2: built in connector
Interpretation of Cocos creator source code: engine start and main loop
To teach you to easily understand the basic usage of Vue codemirror: mainly to achieve code editing, verification prompt, code formatting
Shh! Is this really good for asynchronous events?
視覺滾動[反差美]
Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think