当前位置:网站首页>Two methods to rollback the code in pycharm to the specified version (with screenshot)
Two methods to rollback the code in pycharm to the specified version (with screenshot)
2022-06-25 14:07:00 【YZL40514131】
The first method : use git The command operation
1、 For example, there is the following code in the warehouse ( edition 1)

2、 Now go ahead and write the code , And submit to the remote warehouse ( edition 2)

3、 Back to version 1 in
git reflog: See all historical versions
git reset --hard Version number : Back to the specified version 
At this point, the code has fallen back to the specified version 
4、 You may encounter version conflicts when merging branches during operation
Need to discuss in work , I keep the code on the left 
The second method : use pycharm operation
1、 First, when we need to rollback py Right click on the blank space of the file , Then select... In the pop-up tab Local History>>Show History, As shown in the figure :
2、 Then the dialog box as shown in the following figure pops up 
3、 For code rollback, just right-click in the left column to select the version to rollback , Then select... In the pop-up dialog box Revert that will do , As shown in the figure below :
4、 Prompt after successful rollback 
5、 Code after fallback 
6、 The code is in the workspace . It needs to be submitted to the remote warehouse 


边栏推荐
- Insight into heap and stack stored in new string() /string() in JS
- Dialogue: recommended system quick start route and summary of knowledge points
- 腾讯云搭建Socks5多IP代理服务器实现游戏单窗口单IP完美搭建教程附带工具「建议收藏」
- 数据库中显示error1822,error1824
- 深入理解深度神经网络背后的数学(Mysteries of Neural Networks Part I)
- 楼宇自动化专用BACnet网关BL103
- How to determine if a web worker has been created or closed
- Gorm-- search you don't know
- When the input tag type is number, the input of E, e, -, + is blocked
- Pourquoi les programmeurs devraient - ils être plus doux?
猜你喜欢

Today in history: Netease was founded; The first consumer electronics exhibition was held; The first webcast in the world

Explain the possible memory leaks caused by the handler at one time and the solutions | the developer said · dtalk

Why should programmers be softer?

What are the red lines of open source that should not be trodden on?

Simple realization of mine sweeping

shell 数组

"Mobile cloud Cup" computing power network application innovation competition is in hot registration!
Deep parsing and implementation of redis stream advanced message queue [10000 words]

Cesium learning notes

As a software testing engineer, how do you think to ensure software quality?
随机推荐
删库跑路、“投毒”、改协议,开源有哪几大红线千万不能踩?
阻止深度神经网络过拟合(Mysteries of Neural Networks Part II)
分类器与cross entropy loss函数
Asp.net WebForm使用NPOI导出Excel
Logistic Regression VS Linear Regression
On the compatibility of the disabled attribute of input on the mobile terminal
Rust, the best choice for programmers to start a business?
[proteus simulation] 51 MCU +ds1302+lcd1602 display
网络远程访问的方式使用树莓派
Scope of ES6 variable
"Mobile cloud Cup" computing power network application innovation competition is in hot registration!
英语中的九大词性与九大时态
Untiy force refresh UI
K-line diagram 24 classic diagrams (shadow)
解决报错:Creating window glfw ERROR: GLEW initalization error: Missing GL version
戴尔电脑cpu温度过高怎么办
多台云服务器的 Kubernetes 集群搭建
Syntax 'trap'
Installation and removal of MySQL under Windows
Replace element - counter use of content (2)