Daily Question 01 —— How to restore the WeChat developer tool code is overwritten

1. Description of the problem scenario

When I was using 微信开发者工具it, due to 代码没提交, but at this time 拉取代码, it caused local modification 未提交的代码被覆盖.
Problem occurrence process:
(1) The locally modified code has not been submitted.
(2) Pull remote branch code.
(3) Causes the code to be overwritten.

2. Problem solving

2.1 Restoring via the storage function of WeChat Developer Tools

The specific operation is as follows:
(1) find 版本管理
insert image description here
(2) find 贮藏
insert image description here
the covered code is displayed in the lower right corner.
(3) Recovery code
insert image description here
After selecting the overwritten file 右键. Can only be recovered one by one.

注意:在恢复文件前一定不要提交代码,一旦提交,贮藏区的文件就会被清除。那样代码真的找不回来。

2.2 By restoring the previous version function (only for windows system)

(1) Find the local folder where the code is stored
insert image description here
(2) Restore the previous version
insert image description here

2.3 Universal solution (100% problem solving)

That is to rewrite. . . . .

Therefore, you should always have the habit of code backup, and submit the code frequently without taking too long.

Guess you like

Origin blog.csdn.net/qq_42785250/article/details/124776034